Hi,
Is there a way with Caddy to rewrite the response status code on a condition? I hoped to achieve this with rewrite
but it didn’t work out. Apparently it works like this with nginx:
error_page 403 =404 /404.html;
I want to rewrite 403 to 404 for a very specific use-case in bitwarden, which is described here
I think I cannot use the status
directive since I don’t know which endpoint will trigger the 403
error. So yes, I want to rewrite all 403 to 404 for a specific host.
That’s what I tried:
rewrite {
if {status} is 403
to {status} 404
}
Thanks!