You can use rewrite_by_lua_*/content_by_lua_* inside the location that handles errors.
W dniu sobota, 4 sierpnia 2018 16:06:29 UTC+2 użytkownik Hadi Abbasi napisał:
Hi friends...
I have used below command to show a default page on some status codes:
proxy_intercept_errors on;
error_page 500 501 502 503 /errors/error_50X.html;
location /errors/ {
root /usr/local/openresty/assets;
allow all;
}
I would like to know if I can run an openresty lua function on these error states specially when I'm not the thrower of these status codes!
thanks a lot..
Best,
Hadi