mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
fix: authorization failed when link start to a wrong environment #342
This commit is contained in:
parent
1e9c537bdb
commit
d0924eb4ae
2 changed files with 6 additions and 1 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue