Nginx to Caddy reverse_proxy arguments

1. Caddy version (caddy version):


2. How I run Caddy:

a. System environment:

Oracle Linux 8 w/ systemctl

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:* {
    header * {
        X-Frame-Options "SAMEORIGIN"
}* {
    uri strip_prefix /code

3. The problem I’m having:

I’m trying to find the Caddy equivalent of the Nginx proxy_set_header, proxy_http_version, proxy_buffer_size, proxy_buffers, and proxy_busy_buffers_size

I suggest writing your config like this instead: {
	handle_path /code/* {

	handle {
		header X-Frame-Options "SAMEORIGIN"

Are you sure you need those options? What leads you to believe you do? Caddy’s defaults typically work well for most usecases.

See the reverse_proxy docs:

1 Like

Thanks for the tip on how to write my config. The specific web server I am routing to gives a list of proxy headers and things of that sort that are optional but required for some features to be taken advantage of. I am having no problems at all with my code-server, but I am getting issues without those options on the root server.

This topic was automatically closed after 30 days. New replies are no longer allowed.