-
Notifications
You must be signed in to change notification settings - Fork 3
/
Caddyfile
31 lines (27 loc) · 936 Bytes
/
Caddyfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
debug
auto_https disable_redirects
frankenphp
order php_server before file_server
}
# The domain name of your server
http://localhost {
# Set the webroot to the public/ directory
root * /app/public
# Enable compression (optional)
encode zstd br gzip
@options_method {
method OPTIONS
}
handle @options_method {
header Access-Control-Allow-Origin "*"
header Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Public-Key,Authorization,X-Kanvas-App,X-Kanvas-Key,X-Kanvas-Location"
header Access-Control-Max-Age "1728000"
header Content-Type "text/plain charset=UTF-8"
respond "" 204
}
php_fastcgi /php-fpm
# Execute PHP files from the public/ directory and serve assets
php_server
}