1. My Caddy version (caddy version
):
2.0rc3
2. How I run Caddy:
a. System environment:
Ubuntu Systemd
d. My complete Caddyfile or JSON config:
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"mylodocs.s3-website-us-west-2.amazonaws.com"
]
}
},
"response": {
"require": {
"status_code": [2, 3]
}
}
},
"upstreams": [
{
"dial": "mylodocs.s3-website-us-west-2.amazonaws.com:80"
}
]
}
],
"match": [
{
"host": [
"*.mylodocs.com"
]
}
]
}
3. The problem I’m having:
I want to redirect to an error page when i receive a 404 from an upstream server. My upstream returns a 404 and then shows an error page. But I don’t want to see that error page. I tried requiring a response of 2xx or 3xx but that didn’t seem to work as expected. Whats the best way to do this?