Add /.well-known/openid-configuration route.

This commit is contained in:
Yang Luo
2021-09-25 14:54:13 +08:00
parent 80d2738863
commit a1b5282da9
7 changed files with 112 additions and 2 deletions

View File

@ -108,4 +108,6 @@ func initAPI() {
beego.Router("/api/send-email", &controllers.ApiController{}, "POST:SendEmail")
beego.Router("/api/send-sms", &controllers.ApiController{}, "POST:SendSms")
beego.Router("/.well-known/openid-configuration", &controllers.ApiController{}, "GET:GetOidcDiscovery")
}

View File

@ -24,7 +24,7 @@ import (
func StaticFilter(ctx *context.Context) {
urlPath := ctx.Request.URL.Path
if strings.HasPrefix(urlPath, "/api/") {
if strings.HasPrefix(urlPath, "/api/") || strings.HasPrefix(urlPath, "/.well-known/") {
return
}