Skip to content

Commit

Permalink
add header forward (#262)
Browse files Browse the repository at this point in the history
* change trust proxies directive
* add static trusted_proxies
  • Loading branch information
younes200 authored Dec 8, 2023
1 parent 4680c6a commit defe4ae
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
servers {
trusted_proxies static private_ranges
}
}

:80 {
@trpc path_regexp ^/trpc(/|$)
reverse_proxy @trpc localhost:2021

@admin path_regexp ^/admin(/|$)
reverse_proxy @admin localhost:4000

# Reverse proxy directives
reverse_proxy /trpc/* localhost:2021 {
trusted_proxies 172.25.0.0/16
}
reverse_proxy /admin/* localhost:9000 {
trusted_proxies 172.25.0.0/16
}
reverse_proxy /* localhost:3000 {
trusted_proxies 172.25.0.0/16
}
reverse_proxy localhost:3000
}

0 comments on commit defe4ae

Please sign in to comment.