Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions v2/Laravel/Laravel 12
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ server {
fastcgi_param PHP_VALUE "{{php_settings}}";
}

location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {
# Livewire's dynamic JS/upload endpoints must always hit the PHP
# front controller — never be treated as a static file lookup.
location ^~ /livewire/ {
try_files $uri /index.php?$query_string;
}

location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ {
try_files $uri /index.php?$query_string;
add_header Access-Control-Allow-Origin "*";
add_header alt-svc 'h3=":443"; ma=86400';
expires max;
access_log off;
}

if (-f $request_filename) {
break;
}
}
}