fix(router): enable cors on session endpoints for sso proxies

This commit is contained in:
Trong Huu Nguyen
2023-11-10 10:04:00 +01:00
parent 27ade353d9
commit 191f3c3ca8

View File

@@ -89,7 +89,7 @@ func New(src Source, cfg *config.Config) chi.Router {
})
r.Route(paths.Session, func(r chi.Router) {
if cfg.SSO.IsServer() {
if cfg.SSO.Enabled {
r.Use(cors(http.MethodGet, http.MethodPost))
r.Options("/", noopHandler)