mirror of
https://github.com/rclone/rclone.git
synced 2025-01-09 07:48:19 +01:00
lib/http: Add auth to http service
Fixes https://github.com/rclone/rclone/issues/5620
This commit is contained in:
parent
26b6c83e49
commit
b30731c9d0
@ -96,6 +96,9 @@ func newServer(f fs.Fs, templatePath string) *server {
|
||||
}
|
||||
|
||||
func (s *server) Bind(router chi.Router) {
|
||||
if m := auth.Auth(auth.Opt); m != nil {
|
||||
router.Use(m)
|
||||
}
|
||||
router.Use(
|
||||
middleware.SetHeader("Accept-Ranges", "bytes"),
|
||||
middleware.SetHeader("Server", "rclone/"+fs.Version),
|
||||
|
Loading…
Reference in New Issue
Block a user