Redirect 403 to 404 for a single subdomain

Hi
I selfhost vaultwarden with a reverse proxied CF domain running through a Cloudflare tunnel. Apparently when my server has downtime, vaultwarden returns a 403, which causes my bitwarden app to log out. I read online that if I can change this to return a 404, bitwarden won’t log out and will use cached passwords. How can I make a rule to return 404 instead of 403 when the server is down and only for that single subdomain?

Thanks

Hi there,

This is likely not a result of the tunnel being down, but from your application policy.
With this in mind, have you considered changing the behavior to a redirect instead of a block?

Just to be clear, I’m unsure if it will work in your case, but it hopefully at least throw a 30x instead of a 403.

Take care.

1 Like

I’ll give this a go now and update you if it works. Thanks for your assistance

2 Likes

I don’t have any applications added in Cloudflare. Do I need to do this to make this custom block page work?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.