feat: add environment variable to trust the reverse proxy
This commit is contained in:
7
reverse-proxy/Caddyfile
Normal file
7
reverse-proxy/Caddyfile
Normal file
@@ -0,0 +1,7 @@
|
||||
:3000 {
|
||||
# Reverse proxy for /api
|
||||
reverse_proxy /api/* http://localhost:8080
|
||||
|
||||
# Reverse proxy for all other requests
|
||||
reverse_proxy http://localhost:3333
|
||||
}
|
||||
14
reverse-proxy/Caddyfile.trust-proxy
Normal file
14
reverse-proxy/Caddyfile.trust-proxy
Normal file
@@ -0,0 +1,14 @@
|
||||
:3000 {
|
||||
reverse_proxy /* http://localhost:3333 {
|
||||
trusted_proxies 0.0.0.0/0
|
||||
}
|
||||
|
||||
reverse_proxy /api/* http://localhost:8080 {
|
||||
trusted_proxies 0.0.0.0/0
|
||||
}
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/access.log
|
||||
level WARN
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user