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

+1
View File
@@ -25,6 +25,7 @@ func CreateRouter(staticFolder string, securityConfig *security.Config, uiConfig
securityConfig.ApplySecurityMiddleware(protected)
}
// Endpoints
unprotected.Handle("/v1/config", ConfigHandler{securityConfig: securityConfig}).Methods("GET")
protected.HandleFunc("/v1/endpoints/statuses", EndpointStatuses).Methods("GET") // No GzipHandler for this one, because we cache the content as Gzipped already
protected.HandleFunc("/v1/endpoints/{key}/statuses", GzipHandlerFunc(EndpointStatus)).Methods("GET")
unprotected.HandleFunc("/v1/endpoints/{key}/uptimes/{duration}/badge.svg", UptimeBadge).Methods("GET")