Преглед изворни кода

fix: route default livewire assets through laravel

yemeishu пре 1 недеља
родитељ
комит
9af92af300
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7 3
      docker/nginx.conf

+ 7 - 3
docker/nginx.conf

@@ -49,9 +49,13 @@ http {
             try_files $uri $uri/ /index.php?$query_string;
         }
 
-        # Livewire serves versioned assets through Laravel routes such as
-        # /livewire-bb2e0a45/livewire.js, so these must not be swallowed by
-        # the generic static .js/.css location below.
+        # Livewire serves assets through Laravel routes such as
+        # /livewire/livewire.min.js or /livewire-bb2e0a45/livewire.js, so these
+        # must not be swallowed by the generic static .js/.css location below.
+        location ^~ /livewire/ {
+            try_files $uri $uri/ /index.php?$query_string;
+        }
+
         location ^~ /livewire- {
             try_files $uri $uri/ /index.php?$query_string;
         }