mirror of
https://github.com/mollyim/mollysocket.git
synced 2025-05-12 21:30:40 +01:00
Add Caddyfile sample
This commit is contained in:
parent
b902d0aa92
commit
637585b61f
1 changed files with 29 additions and 0 deletions
29
reverse_proxy_samples/Caddyfile
Normal file
29
reverse_proxy_samples/Caddyfile
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
auto_https disable_redirects
|
||||
|
||||
servers {
|
||||
metrics
|
||||
}
|
||||
}
|
||||
|
||||
(upgrade) {
|
||||
@upgradable {
|
||||
header Upgrade-Insecure-Requests 1
|
||||
protocol http
|
||||
}
|
||||
|
||||
redir @upgradable https://{host}{uri} 308
|
||||
|
||||
}
|
||||
|
||||
# Caddy pass the request `Host` header by default
|
||||
molly.domain.tld {
|
||||
reverse_proxy 127.0.0.1:8020
|
||||
}
|
||||
|
||||
# # If you need to set on another path
|
||||
# www.domain.tld {
|
||||
# reverse_proxy /molly/ 127.0.0.1:8020 {
|
||||
# header_up X-Original-URL "/molly/"
|
||||
# }
|
||||
# }
|
Loading…
Reference in a new issue