feat(admin-panel): update url
feat(admin-panel): update some of the ui feat(oauth-screen): make oauth success screen match the rest of the app
This commit is contained in:
parent
3db5ec25c2
commit
f6ed4f1e2e
8 changed files with 79 additions and 34 deletions
|
|
@ -33,8 +33,8 @@ var corsExposedResponseHeaders = []string{
|
|||
var corsExposedResponseHeadersJoined = strings.Join(corsExposedResponseHeaders, ", ")
|
||||
|
||||
const (
|
||||
exampleAPIKeyManagementPath = "/management.html"
|
||||
exampleAPIKeyManagementURL = "/management.html?safe-mode=configure"
|
||||
exampleAPIKeyManagementPath = "/admin"
|
||||
exampleAPIKeyManagementURL = "/admin?safe-mode=configure"
|
||||
)
|
||||
|
||||
func (s *Server) homeHeartbeatMiddleware() gin.HandlerFunc {
|
||||
|
|
@ -45,7 +45,11 @@ func (s *Server) homeHeartbeatMiddleware() gin.HandlerFunc {
|
|||
}
|
||||
if c != nil && c.Request != nil {
|
||||
path := c.Request.URL.Path
|
||||
if strings.HasPrefix(path, "/v0/management/") || path == "/v0/management" || strings.HasPrefix(path, "/v0/resource/plugins/") || path == "/management.html" {
|
||||
if strings.HasPrefix(path, "/v0/management/") ||
|
||||
path == "/v0/management" ||
|
||||
strings.HasPrefix(path, "/v0/resource/plugins/") ||
|
||||
path == exampleAPIKeyManagementPath ||
|
||||
strings.HasPrefix(path, exampleAPIKeyManagementPath+"/") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
|
@ -87,7 +91,7 @@ func (s *Server) exampleAPIKeySafeModeMiddleware() gin.HandlerFunc {
|
|||
c.Header("X-CPA-SAFE-MODE", "example-api-key")
|
||||
c.AbortWithStatusJSON(http.StatusForbidden, gin.H{
|
||||
"error": "unsafe_example_api_key",
|
||||
"message": "Proxy API endpoints are disabled because api-keys contains template values. Open /management.html?safe-mode=configure, update api-keys in Management, then retry.",
|
||||
"message": "Proxy API endpoints are disabled because api-keys contains template values. Open /admin?safe-mode=configure, update api-keys in Management, then retry.",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue