fix(samba): register /api/sharing/ on the mux, not the web switch
The /api/ subtree is routed on the main mux, so the browse case in the web ServeHTTP switch was shadowed by the apiRouter catch-all and 401'd. Moved to ServeSharingAPI behind RequireAuth+CsrfProtect, matching /api/storage/. Found by live validation.
This commit is contained in:
@@ -367,8 +367,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
s.sharingShareDeleteHandler(w, r)
|
||||
case path == "/sharing/shares/offsite" && r.Method == http.MethodPost:
|
||||
s.sharingShareOffsiteHandler(w, r)
|
||||
case path == "/api/sharing/browse" && r.Method == http.MethodGet:
|
||||
s.sharingBrowseHandler(w, r)
|
||||
case path == "/settings/notifications" && r.Method == http.MethodGet:
|
||||
s.settingsNotificationsPageHandler(w, r)
|
||||
case path == "/settings/security" && r.Method == http.MethodGet:
|
||||
|
||||
Reference in New Issue
Block a user