N
N
NO_GLITCH2018-09-06 23:30:48
Nginx
NO_GLITCH, 2018-09-06 23:30:48

Can nginx give its 403 page while using proxy_pass?

The backend serves a specific location It is
necessary for clients to issue a nice 403, but there is also a need to reduce traffic between nginx and the backend.
If you send a 403 response from the backend, without a body, then nginx will show just a white background
. Is it possible to make it serve pages with a 403 response from the backend itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
O. J, 2018-09-06
@NO_GLITCH

It is necessary for customers to issue a beautiful 403

error_page 403 /custom_403.html;

location / {
...
proxy_intercept_errors on;
...
}

man
update

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question