mirror of https://gitlab.com/curben/blog
post(caddy): dedup config
This commit is contained in:
parent
4d98701970
commit
d50f580cc5
|
@ -464,23 +464,19 @@ Since I also set up reverse proxy for {% post_link tor-hidden-onion-nixos 'Tor O
|
||||||
header_up User-Agent "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
header_up User-Agent "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||||
}
|
}
|
||||||
|
|
||||||
(oneWeekCache) {
|
(reverseProxy) {
|
||||||
Cache-Control "max-age=604800, public"
|
reverse_proxy https://{args.0} {
|
||||||
|
import removeHeaders
|
||||||
|
header_up Host "{args.0}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(pathProxy) {
|
(pathProxy) {
|
||||||
header /js/* {
|
@staticFiles {
|
||||||
import oneWeekCache
|
path *.css *.gif *.ico *.jpg *.js *.png *.svg *.webp *.xml
|
||||||
defer
|
|
||||||
}
|
}
|
||||||
|
header @staticFiles {
|
||||||
header /css/* {
|
Cache-Control "max-age=604800, public"
|
||||||
import oneWeekCache
|
|
||||||
defer
|
|
||||||
}
|
|
||||||
|
|
||||||
header /svg/* {
|
|
||||||
import oneWeekCache
|
|
||||||
defer
|
defer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,35 +488,16 @@ Since I also set up reverse proxy for {% post_link tor-hidden-onion-nixos 'Tor O
|
||||||
handle_path /img/* {
|
handle_path /img/* {
|
||||||
rewrite * /img/gitlab.com/curben/blog/raw/site{path}
|
rewrite * /img/gitlab.com/curben/blog/raw/site{path}
|
||||||
|
|
||||||
reverse_proxy https://cdn.statically.io {
|
import reverseProxy cdn.statically.io
|
||||||
import removeHeaders
|
|
||||||
header_up Host cdn.statically.io
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
header /img/* {
|
|
||||||
import oneWeekCache
|
|
||||||
defer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_path /screenshot/* {
|
handle_path /screenshot/* {
|
||||||
rewrite * /screenshot/curben.netlify.app{path}?mobile=true
|
rewrite * /screenshot/curben.netlify.app{path}?mobile=true
|
||||||
|
|
||||||
reverse_proxy https://cdn.statically.io {
|
import reverseProxy cdn.statically.io
|
||||||
import removeHeaders
|
|
||||||
header_up Host cdn.statically.io
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header /screenshot/* {
|
import reverseProxy curben.netlify.app
|
||||||
import oneWeekCache
|
|
||||||
defer
|
|
||||||
}
|
|
||||||
|
|
||||||
reverse_proxy https://curben.netlify.app {
|
|
||||||
import removeHeaders
|
|
||||||
header_up Host curben.netlify.app
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue