Procházet zdrojové kódy

fix: route livewire assets through laravel in nginx

yemeishu před 1 měsícem
rodič
revize
73bd400d03
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      docker/nginx.conf

+ 7 - 0
docker/nginx.conf

@@ -49,6 +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.
+        location ^~ /livewire- {
+            try_files $uri $uri/ /index.php?$query_string;
+        }
+
         # PHP-FPM 处理
         location ~ \.php$ {
             fastcgi_pass 127.0.0.1:9000;