you will get the following error: adapting config using caddyfile: parsing caddyfile tokens for 'reverse_proxy': configuring 'handle_response' for status code replacement is no longer supported. Use 'replace_status' instead. even though you're not touching the status code.
@francislavoie This was from about 2 years ago; maybe it's time to revisit while we're at it? The previous line says // TODO: Remove this check at some point in the future.
If you use the following Caddyfile:
you will get the following error:
adapting config using caddyfile: parsing caddyfile tokens for 'reverse_proxy': configuring 'handle_response' for status code replacement is no longer supported. Use 'replace_status' instead.
even though you're not touching the status code.If you use either
or
no error is raised.
Seems to be a check implemented at https://github.com/caddyserver/caddy/blob/54a0c8f94821f393edec1a1bc9459f2363c95117/modules/caddyhttp/reverseproxy/caddyfile.go#L915 that just complains if there are two parameters passed to
handle_response
.