This commit is contained in:
2026-03-21 15:41:30 -04:00
parent 197a1577c2
commit ba919bbde4
19 changed files with 824 additions and 198 deletions

View File

@@ -46,8 +46,8 @@ func (s *Server) authMiddleware(handler StrictHandlerFunc, operationID string) S
ctx = context.WithValue(ctx, "request", r)
ctx = context.WithValue(ctx, "response", w)
// Skip auth for login endpoint only - cover and file require auth via cookies
if operationID == "Login" {
// Skip auth for login and info endpoints - cover and file require auth via cookies
if operationID == "Login" || operationID == "GetInfo" {
return handler(ctx, w, r, request)
}
@@ -67,3 +67,13 @@ func (s *Server) authMiddleware(handler StrictHandlerFunc, operationID string) S
}
}
// GetInfo returns server information
func (s *Server) GetInfo(ctx context.Context, request GetInfoRequestObject) (GetInfoResponseObject, error) {
return GetInfo200JSONResponse{
Version: s.cfg.Version,
SearchEnabled: s.cfg.SearchEnabled,
RegistrationEnabled: s.cfg.RegistrationEnabled,
}, nil
}