Skip to content

Commit

Permalink
fix(pgs): cache custom domains
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Dec 8, 2024
1 parent fc16c4a commit 85c7e12
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ ssh_data
__debug_bin
.bin
/public/
caddy/caddy
48 changes: 34 additions & 14 deletions caddy/Caddyfile.pgs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,48 @@
}
}

:443 {
reverse_proxy web:3000
log {
format append {
server_id {$APP_DOMAIN}
}
}

#tls internal {
# on_demand
#}
tls {$APP_EMAIL} {
on_demand
}

encode zstd gzip
route {
cache {
regex {
exclude /check
}
key {
template {http.request.method}-{http.request.path}
}
}
}
}

*.{$APP_DOMAIN}, {$APP_DOMAIN} {
reverse_proxy web:3000
log {
format append {
server_id {$APP_DOMAIN}
}
}

#tls internal
tls {$APP_EMAIL} {
dns cloudflare {$CF_API_TOKEN}
resolvers 1.1.1.1
}

route {
@souinApi path /souin-api/*
basic_auth @souinApi {
Expand All @@ -38,8 +69,10 @@
regex {
exclude /check
}
key {
template {http.request.method}-{http.request.path}
}
}
reverse_proxy web:3000
}

encode zstd gzip
Expand Down Expand Up @@ -117,16 +150,3 @@ monitoring.{$MONITORING_APP_DOMAIN}, prometheus.{$MONITORING_APP_DOMAIN}, grafan
disable_openmetrics
}
}

:443 {
reverse_proxy web:3000
log {
format append {
server_id {$APP_DOMAIN}
}
}
tls {$APP_EMAIL} {
on_demand
}
encode zstd gzip
}

0 comments on commit 85c7e12

Please sign in to comment.