Configs for the Caddy webserver
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
931 B

# vim: ft=caddyfile
{
grace_period 60s
import email
}
#{
# servers :443 {
# protocol {
# experimental_http3
# }
# }
#}
(basicerrors) {
handle_errors {
#respond "{http.error.status_code} {http.error.status_text}"
templates
rewrite * /index.html
root * /etc/caddy/errors
file_server
}
}
(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
}
}
(log) {
log {
output file /var/log/caddy/access.log
}
}
import conf.d/*