mirror of
https://github.com/zitadel/oidc.git
synced 2026-04-29 06:29:34 -05:00
feat: add cors * to handler
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
@@ -40,6 +41,7 @@ func CreateRouter(o OpenIDProvider, h HttpInterceptor) *mux.Router {
|
||||
h = DefaultInterceptor
|
||||
}
|
||||
router := mux.NewRouter()
|
||||
router.Use(handlers.CORS())
|
||||
router.HandleFunc(healthzEndpoint, Healthz)
|
||||
router.HandleFunc(readinessEndpoint, o.HandleReady)
|
||||
router.HandleFunc(oidc.DiscoveryEndpoint, o.HandleDiscovery)
|
||||
|
||||
Reference in New Issue
Block a user