diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2021-07-22 13:52:37 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 13:52:37 +1000 |
| commit | 911d71204f2f5846c7d677d049b3c8d26b6f0637 (patch) | |
| tree | 111204b788770240d0a3277bcd7474779193e5fb /internal/server/server.go | |
| parent | 7a4779b08e2ebd0036af3f132eb00b99b4d3c124 (diff) | |
fix(handlers): handle xhr requests to /api/verify with 401 (#2189)
This changes the way XML HTTP requests are handled on the verify endpoint so that they are redirected using a 401 instead of a 302/303.
Diffstat (limited to 'internal/server/server.go')
| -rw-r--r-- | internal/server/server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 479aa1e4b..a602c78c2 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -43,6 +43,8 @@ func registerRoutes(configuration schema.Configuration, providers middlewares.Pr r := router.New() r.GET("/", serveIndexHandler) + r.OPTIONS("/", autheliaMiddleware(handleOPTIONS)) + r.GET("/api/", serveSwaggerHandler) r.GET("/api/"+apiFile, serveSwaggerAPIHandler) |
