Add hsts snippet

This commit is contained in:
BBaoVanC 2021-09-04 16:47:16 -05:00
parent 5ec08910ce
commit d265cc7253
18 changed files with 22 additions and 1 deletions

View File

@ -24,6 +24,10 @@
} }
} }
(hsts) {
header Strict-Transport-Security max-age=31536000
}
(matrix-well-known) { (matrix-well-known) {
handle_path /.well-known/matrix/* { handle_path /.well-known/matrix/* {
header Access-Control-Allow-Origin "*" header Access-Control-Allow-Origin "*"

View File

@ -2,7 +2,7 @@
bin.boba.best { bin.boba.best {
encode zstd gzip encode zstd gzip
header Strict-Transport-Security max-age=31536000 import hsts
root * /var/www/bin.boba.best root * /var/www/bin.boba.best
php_fastcgi unix//run/php/php-fpm.sock php_fastcgi unix//run/php/php-fpm.sock

View File

@ -5,6 +5,7 @@ www.boba.best {
} }
boba.best { boba.best {
import matrix-well-known import matrix-well-known
import hsts
header Access-Control-Allow-Origin * header Access-Control-Allow-Origin *
root * /var/www/boba.best/public root * /var/www/boba.best/public

View File

@ -2,6 +2,7 @@
drone.boba.best { drone.boba.best {
encode zstd gzip encode zstd gzip
import hsts
reverse_proxy localhost:8081 { reverse_proxy localhost:8081 {
header_up X-Real-IP {remote_host} header_up X-Real-IP {remote_host}

View File

@ -2,6 +2,7 @@
emotes.boba.best { emotes.boba.best {
encode zstd gzip encode zstd gzip
import hsts
root * /var/www/emotes.boba.best/public root * /var/www/emotes.boba.best/public
file_server { file_server {

View File

@ -1,6 +1,8 @@
# vim: ft=caddyfile # vim: ft=caddyfile
errors.boba.best { errors.boba.best {
encode zstd gzip
import hsts
root * /etc/caddy/errors/img root * /etc/caddy/errors/img
file_server file_server
import basicerrors import basicerrors

View File

@ -2,6 +2,7 @@
flower.boba.best { flower.boba.best {
encode zstd gzip encode zstd gzip
import hsts
root * /var/www/flower.boba.best root * /var/www/flower.boba.best
handle { handle {

View File

@ -2,6 +2,7 @@
furry.boba.best { furry.boba.best {
encode zstd gzip encode zstd gzip
import hsts
root * /var/www/furry.boba.best root * /var/www/furry.boba.best
handle { handle {

View File

@ -2,6 +2,7 @@
git.boba.best { git.boba.best {
encode zstd gzip encode zstd gzip
import hsts
handle_path /_/static/assets/* { handle_path /_/static/assets/* {
root * /var/www/git.boba.best/public root * /var/www/git.boba.best/public

View File

@ -2,6 +2,7 @@
grafana.boba.best { grafana.boba.best {
encode zstd gzip encode zstd gzip
import hsts
reverse_proxy localhost:84 reverse_proxy localhost:84
import basicerrors import basicerrors

View File

@ -2,6 +2,7 @@
mail.boba.best mail.bbaovanc.com autodiscover.boba.best autodiscover.bbaovanc.com autoconfig.boba.best autoconfig.bbaovanc.com { mail.boba.best mail.bbaovanc.com autodiscover.boba.best autodiscover.bbaovanc.com autoconfig.boba.best autoconfig.bbaovanc.com {
encode zstd gzip encode zstd gzip
import hsts
reverse_proxy localhost:8082 { reverse_proxy localhost:8082 {
header_up X-Real-IP {remote_host} header_up X-Real-IP {remote_host}

View File

@ -2,6 +2,7 @@
matrix.boba.best { matrix.boba.best {
encode zstd gzip encode zstd gzip
import hsts
import matrix-well-known import matrix-well-known

View File

@ -2,6 +2,7 @@
peertube.boba.best { peertube.boba.best {
encode zstd gzip encode zstd gzip
import hsts
reverse_proxy 127.0.0.1:9000 { reverse_proxy 127.0.0.1:9000 {
header_up X-Real-IP {remote_host} header_up X-Real-IP {remote_host}

View File

@ -1,6 +1,7 @@
# vim: ft=caddyfile # vim: ft=caddyfile
rick.boba.best { rick.boba.best {
encode zstd gzip
redir https://www.youtube.com/watch?v=dQw4w9WgXcQ temporary redir https://www.youtube.com/watch?v=dQw4w9WgXcQ temporary
import basicerrors import basicerrors
} }

View File

@ -2,6 +2,7 @@
status.boba.best { status.boba.best {
encode zstd gzip encode zstd gzip
import hsts
respond "I can't find any good status page software." 404 respond "I can't find any good status page software." 404
import basicerrors import basicerrors
} }

View File

@ -2,6 +2,7 @@
stib.boba.best { stib.boba.best {
encode zstd gzip encode zstd gzip
import hsts
root * /var/www/stib.boba.best root * /var/www/stib.boba.best
handle { handle {

View File

@ -1,5 +1,6 @@
# vim: ft=caddyfile # vim: ft=caddyfile
turn.boba.best { turn.boba.best {
encode zstd gzip
respond "where are you" respond "where are you"
} }

View File

@ -2,6 +2,7 @@
vault.boba.best { vault.boba.best {
encode zstd gzip encode zstd gzip
import hsts
header { header {
X-XSS-Protection "1; mode=block" X-XSS-Protection "1; mode=block"