diff --git a/app/src/views/dashboard/Environments.vue b/app/src/views/dashboard/Environments.vue index 36187365..f5904eff 100644 --- a/app/src/views/dashboard/Environments.vue +++ b/app/src/views/dashboard/Environments.vue @@ -120,7 +120,7 @@ const visible = computed(() => { diff --git a/router/proxy.go b/router/proxy.go index ac2fb72a..67990312 100644 --- a/router/proxy.go +++ b/router/proxy.go @@ -79,6 +79,11 @@ func proxy() gin.HandlerFunc { defer resp.Body.Close() + // rewrite status code to fix https://github.com/0xJacky/nginx-ui/issues/342 + if resp.StatusCode == http.StatusForbidden { + resp.StatusCode = http.StatusServiceUnavailable + } + c.Writer.WriteHeader(resp.StatusCode) c.Writer.Header().Add("Content-Type", resp.Header.Get("Content-Type"))