mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: env.json caching, readiness and unique lockerIDs (#3596)
* fix: readiness check * disable cache for env.json * always generate unique lockerID * fix tests
This commit is contained in:
@@ -73,7 +73,7 @@ func Start(config Config, externalSecure bool, issuer op.IssuerFromRequest, inst
|
||||
security := middleware.SecurityHeaders(csp(), nil)
|
||||
|
||||
handler := mux.NewRouter()
|
||||
handler.Use(cache, security)
|
||||
handler.Use(security)
|
||||
handler.Handle(envRequestPath, middleware.TelemetryHandler()(instanceHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
instance := authz.GetInstance(r.Context())
|
||||
if instance.InstanceID() == "" {
|
||||
@@ -89,7 +89,7 @@ func Start(config Config, externalSecure bool, issuer op.IssuerFromRequest, inst
|
||||
_, err = w.Write(environmentJSON)
|
||||
logging.OnError(err).Error("error serving environment.json")
|
||||
}))))
|
||||
handler.SkipClean(true).PathPrefix("").Handler(http.FileServer(&spaHandler{http.FS(fSys)}))
|
||||
handler.SkipClean(true).PathPrefix("").Handler(cache(http.FileServer(&spaHandler{http.FS(fSys)})))
|
||||
return handler, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user