Skip to content

Commit

Permalink
Add Caddyfile sample
Browse files Browse the repository at this point in the history
  • Loading branch information
p1gp1g committed Dec 5, 2024
1 parent b902d0a commit 637585b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions reverse_proxy_samples/Caddyfile
Original file line number Diff line number Diff line change
@@ -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/"
# }
# }

0 comments on commit 637585b

Please sign in to comment.