Reverse Proxy Configuration (Caddy)
- Install
caddyusing the official documentation - Edit the Caddyfile
sudo nano /etc/caddy/Caddyfile - Add the following
# where example.com is your base domain # 127.0.0.1 is your host. It can be the IP of the docker container. cyberbro.example.com { reverse_proxy http://127.0.0.1:5000 header { Access-Control-Allow-Origin https://cyberbro.example.com # be very careful, you can put * at your own risk. } } -
Reload the configuration
orsudo systemctl reload caddysudo service caddy reload -
Access https://cyberbro.example.com (with an automatic Let's Encrypt certificate), that's great with
caddy
Warning
Make sure to set up proper filtering and security for your reverse proxy, especially if you are exposing Cyberbro to the internet (which is not recommended without proper security measures like WAF, external authentication tool... etc.).