Files
nix/templates/default/Caddyfile
2025-07-10 14:39:00 -04:00

35 lines
594 B
Caddyfile

(cors) {
@origin header Origin {args[0]}
header @origin Access-Control-Allow-Origin "{args[0]}"
header @origin Access-Control-Allow-Methods "OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE"
}
wp.test {
root * .
encode zstd gzip
file_server
php_fastcgi 127.0.0.1:9009
tls internal
}
laravel.test {
# import cors laravel.test
respond /caddy/live OK
root * ./public
try_files {path} page-cache/{path}.html page-cache/{path}.json page-cache/{path}.xml
encode zstd gzip
file_server
php_fastcgi 127.0.0.1:9009
# Uncomment for Laravel Octane
# reverse_proxy :8000
tls internal
}