caddy/Caddyfile

44 lines
858 B
Caddyfile
Raw Normal View History

2021-08-01 16:59:16 -05:00
# vim: ft=caddyfile
{
2021-08-03 18:40:32 -05:00
grace_period 60s
2021-08-01 16:59:16 -05:00
import email
}
#{
# servers :443 {
# protocol {
# experimental_http3
# }
# }
#}
(basicerrors) {
handle_errors {
#respond "{http.error.status_code} {http.error.status_text}"
2021-08-21 17:18:23 -05:00
templates
rewrite * /index.html
root * /etc/caddy/errors
2021-08-01 16:59:16 -05:00
file_server
}
}
2021-09-04 16:47:16 -05:00
(hsts) {
header Strict-Transport-Security max-age=31536000
}
(matrix-well-known) {
handle_path /.well-known/matrix/* {
header Access-Control-Allow-Origin "*"
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
rewrite * {path}.json
root * /etc/caddy/matrix_well_known
file_server
}
}
2021-08-01 16:59:16 -05:00
import conf.d/*