Handle CORS requests before authentication (#413)

This helps our FE to get proper request responses
This commit is contained in:
Maycon Santos 2022-08-05 22:41:04 +02:00 committed by GitHub
parent 1be8c16e34
commit 14e322d3f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ func APIHandler(accountManager s.AccountManager, authIssuer string, authAudience
accountManager.IsUserAdmin)
apiHandler := mux.NewRouter()
apiHandler.Use(jwtMiddleware.Handler, corsMiddleware.Handler, acMiddleware.Handler)
apiHandler.Use(corsMiddleware.Handler, jwtMiddleware.Handler, acMiddleware.Handler)
groupsHandler := NewGroups(accountManager, authAudience)
rulesHandler := NewRules(accountManager, authAudience)