vrtmrz / self-hosted-livesync-server

120 stars 25 forks source link

Caddyfile #8

Open danielintempesta opened 1 year ago

danielintempesta commented 1 year ago

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 commented 1 year ago

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
        }
}