mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:47:33 +00:00
fix: add interceptors for console (#255)
* add interceptors for console * add interceptors for console to env.json
This commit is contained in:
@@ -48,7 +48,16 @@ func (h *headers) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
var err error
|
||||
nonce, err = generateNonce(h.nonceLength)
|
||||
if err != nil {
|
||||
h.errorHandler(err).ServeHTTP(w, r)
|
||||
errorHandler := h.errorHandler
|
||||
if errorHandler == nil {
|
||||
errorHandler = func(err error) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
})
|
||||
}
|
||||
}
|
||||
errorHandler(err).ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
r = saveContext(r, nonceKey, nonce)
|
||||
|
Reference in New Issue
Block a user