diff --git a/deploy/nginx/vhost-dev.conf b/deploy/nginx/vhost-dev.conf index d9361a3..bb55335 100644 --- a/deploy/nginx/vhost-dev.conf +++ b/deploy/nginx/vhost-dev.conf @@ -87,9 +87,11 @@ server { } } - # Handle asset files (css, js, images, etc.) - serve directly if they exist + # Handle asset files (css, js, images, etc.) - serve directly if they + # exist, otherwise hand off to the front controller so app routes whose + # paths end in asset extensions (e.g. DAV resources) keep working. location ~* \.(css|js|mjs|svg|gif|png|jpg|jpeg|ico|woff|woff2|ttf|eot|map)$ { - try_files $uri =404; + try_files $uri @php; expires 1m; add_header Cache-Control "public, immutable"; types { diff --git a/deploy/nginx/vhost.conf b/deploy/nginx/vhost.conf index ee4609b..b03d976 100644 --- a/deploy/nginx/vhost.conf +++ b/deploy/nginx/vhost.conf @@ -57,9 +57,11 @@ server { add_header Cache-Control "no-cache, must-revalidate"; } - # Handle asset files (css, js, images, etc.) - serve directly if they exist + # Handle asset files (css, js, images, etc.) - serve directly if they + # exist, otherwise hand off to the front controller so app routes whose + # paths end in asset extensions (e.g. DAV resources) keep working. location ~* \.(css|js|svg|gif|png|jpg|jpeg|ico|woff|woff2|ttf|eot|map)$ { - try_files $uri =404; + try_files $uri @php; expires 1y; add_header Cache-Control "public, immutable"; }