oidc: Add /api/v1/config route for determining whether to display a login button on the UI

This commit is contained in:
TwiN committed 2022-01-02 21:14:01 -05:00
1 parent 8838f6f2ad
commit 425c1d3674
15 files changed
+135 -27

No files matched your search

+4
View File
@@ -4,7 +4,11 @@ import "net/http"
func DevelopmentCORS(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Credentials", "true")
w.Header().Set("Access-Control-Allow-Origin", "http://localhost:8081")
if r.Method == "OPTIONS" {
return
}
next.ServeHTTP(w, r)
})
}