[SLOYD] add status OPTIONS
This commit is contained in:
parent
e366251b50
commit
cd82973775
2 changed files with 4 additions and 1 deletions
|
|
@ -61,5 +61,7 @@ func UserStatus(ctx *context.Context) {
|
|||
if ctx.IsSigned {
|
||||
ctx.Data["UserName"] = ctx.Doer.DisplayName()
|
||||
}
|
||||
|
||||
ctx.Resp.Header().Add("Access-Control-Allow-Origin", "*")
|
||||
ctx.HTML(http.StatusOK, tplStatus)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -431,7 +431,8 @@ func registerRoutes(m *web.Route) {
|
|||
// Especially some AJAX requests, we can reduce middleware number to improve performance.
|
||||
|
||||
m.Get("/", Home)
|
||||
m.Get("/status", UserStatus)
|
||||
//m.Get("/status", UserStatus)
|
||||
m.Methods("GET, HEAD, OPTIONS", "/status", UserStatus, optionsCorsHandler())
|
||||
m.Get("/sitemap.xml", sitemapEnabled, ignExploreSignIn, HomeSitemap)
|
||||
m.Group("/.well-known", func() {
|
||||
m.Get("/openid-configuration", auth.OIDCWellKnown)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue