Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddyfile #8

Open
danielintempesta opened this issue Feb 14, 2023 · 1 comment
Open

Caddyfile #8

danielintempesta opened this issue Feb 14, 2023 · 1 comment

Comments

@danielintempesta
Copy link

Hi. What could be the equivalent of the instructions in the docker-compose.yml file to include in my Caddyfile?

¿From docker-compose.yml:

            caddy.handle_path: /*
            caddy.handle_path.0_respond: "\"\" 403"
            caddy.handle_path.0_header.-Server: ""
            caddy.handle_path_1: /e=_/* 
            caddy.handle_path_1.0_reverse_proxy: "{{upstreams 5984}}"

To Caddyfile?:

domain {
        handle_path /* {
                header {
                        -server
                }
                respond 403
        }
        handle_path /e=_/* {
                reverse_proxy IP:5984
        }
}

Thanks

@nfowler
Copy link

nfowler commented May 21, 2023

To anyone else looking into this topic, I can confirm that the above Caddyfile will work. I came up with something very similar:

domain {
        handle_path /* {
                header {
                        -server
                }
                respond "Access denied" 403 {
                        close
                }
        }

        handle_path /e=<secret>/* {
                reverse_proxy ip:5984
        }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants