fix: handle 401 and 403 by external auth (#9131)

This commit is contained in:
Johannes Würbach 2022-10-13 00:41:04 +02:00 committed by GitHub
parent c9faac2222
commit 6aac00648b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1288,7 +1288,7 @@ stream {
{{- end }} {{- end }}
return return
end end
if res.status == ngx.HTTP_FORBIDDEN then if res.status == ngx.HTTP_UNAUTHORIZED or res.status == ngx.HTTP_FORBIDDEN then
ngx.exit(res.status) ngx.exit(res.status)
end end
ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)