V2: Basicauth feature

Does Caddy v2 support basicauth in file_server?

I couldn’t find anything related in the v2 documentation.

Thanks!

Hi @HNRK,

The file server in v2 is what’s referred to as a terminating handler. The scope of its functionality is to produce a file for the client, ending the request chain.

Authentication, such as basic auth, would be a non-terminating handler (a middleware) you would introduce as part of the chain, e.g. match /path → basicauth foo bar → serve file.

Doesn’t look like basic auth is in yet, though.

1 Like

Ahh okay, thank you for the explanation! :slight_smile:

Okay, then I can safely open an issue/feature request for it.

EDIT: Created PR for v2 basicauth: v2: basicauth feature · Issue #2747 · caddyserver/caddy · GitHub

1 Like

Implemented in http: authentication module; hash-password cmd; http_basic provider · caddyserver/caddy@f8366c2 · GitHub.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.