Skip to content

caddyfile: add handle_response blocks to reverse_proxy #3707

@maxatome

Description

@maxatome

Caddyfile support for the handle_response option of reverse_proxy would be nice.

See the JSON configuration here:

https://caddyserver.com/docs/json/apps/http/servers/errors/routes/handle/reverse_proxy/handle_response/

Maybe it could look something like this in the Caddyfile:

reverse_proxy ... {
	...
	handle_response header X-Accel-Redirect {
		... 
	}
	handle_response status 4xx {
		...
	}
	handle_response {
		...
	}
}

(Responses can be matched by headers or status code. Just showing a few examples here.)

Originally posted by @mholt in #3347 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions