pass origin into GetUserinfoFromToken

This commit is contained in:
Livio Amstutz 2020-08-24 07:52:22 +02:00
parent c88e6b4ab3
commit 6e71c17f1d
5 changed files with 11 additions and 9 deletions

View file

@ -44,7 +44,7 @@ func CreateRouter(o OpenIDProvider, h HttpInterceptor) *mux.Router {
h = DefaultInterceptor
}
router := mux.NewRouter()
router.Use(handlers.CORS(handlers.AllowedOriginValidator(allowAllOrigins)))
router.Use(handlers.CORS(handlers.AllowedOriginValidator(allowAllOrigins), handlers.AllowedHeaders([]string{"content-type"})))
router.HandleFunc(healthzEndpoint, Healthz)
router.HandleFunc(readinessEndpoint, o.HandleReady)
router.HandleFunc(oidc.DiscoveryEndpoint, o.HandleDiscovery)