99 lines
1.7 KiB
Caddyfile
99 lines
1.7 KiB
Caddyfile
(hugo_common) {
|
|
encode zstd gzip
|
|
|
|
header {
|
|
X-Frame-Options "SAMEORIGIN"
|
|
X-Content-Type-Options "nosniff"
|
|
X-XSS-Protection "1; mode=block"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
}
|
|
|
|
@static {
|
|
path *.jpg *.jpeg *.png *.gif *.ico *.css *.js *.svg *.woff *.woff2 *.ttf *.xml
|
|
}
|
|
|
|
handle @static {
|
|
file_server
|
|
header {
|
|
Cache-Control "public, max-age=31536000, immutable"
|
|
}
|
|
}
|
|
@html {
|
|
path *.html
|
|
}
|
|
handle @html {
|
|
file_server
|
|
try_files {path} {path}/ /index.html
|
|
}
|
|
|
|
handle {
|
|
file_server
|
|
try_files {path} {path}/ /index.html
|
|
}
|
|
|
|
@hidden {
|
|
path_regexp ^.*/\..*$
|
|
}
|
|
respond @hidden 404
|
|
|
|
handle /js/script.js {
|
|
rewrite * /js/script.file-downloads.hash.outbound-links.js
|
|
reverse_proxy https://analytics.lebubu.org {
|
|
header_up Host analytics.lebubu.org
|
|
}
|
|
}
|
|
|
|
handle /api/event {
|
|
reverse_proxy https://analytics.lebubu.org {
|
|
header_up Host analytics.lebubu.org
|
|
}
|
|
}
|
|
}
|
|
|
|
www.danilo-reyes.com {
|
|
redir https://danilo-reyes.com{uri}
|
|
}
|
|
|
|
www.blog.danilo-reyes.com {
|
|
redir https://blog.danilo-reyes.com{uri}
|
|
}
|
|
|
|
danilo-reyes.com {
|
|
root * /var/www/html/portfolio
|
|
import hugo_common
|
|
}
|
|
|
|
blog.danilo-reyes.com {
|
|
route {
|
|
handle_path /isso* {
|
|
reverse_proxy 10.77.0.2:8180
|
|
}
|
|
root * /var/www/html/blog
|
|
import hugo_common
|
|
}
|
|
}
|
|
|
|
mb-report.lebubu.org {
|
|
root * /var/www/html/lidarr-mb-gap
|
|
file_server
|
|
encode gzip zstd
|
|
|
|
try_files {path} /missing_albums.html
|
|
|
|
@html {
|
|
path *.html
|
|
}
|
|
header @html Content-Type "text/html; charset=utf-8"
|
|
|
|
@json {
|
|
path *.json
|
|
}
|
|
header @json Content-Type "application/json"
|
|
|
|
header {
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "SAMEORIGIN"
|
|
}
|
|
}
|