CSS and JS not working on Kubernetes (GCP)
I'm trying to deploy Laravel Filament (V2) on K8S (GCP) but Filament not working it not render CSS , JS.
All assets has been loaded but not render.
I'm trying another path like Telescope it working normally
10 Replies
What does the console say in the browser
Have you setup the url in the .env correctly?
What is returned as the CSS/JS?
Web Hosting, Domain Name Registration - MyDomain.com
Small business web hosting offering additional business services such as: domain name registrations, email accounts, web services, and various small business solutions.
What is the content of the files?
The original file content but Content-Type returned as text/html. By the way in Laravel telescope css and js return Content-Type header correctly.
You probably need to adjust your server config then, so that the files are shipped with the appropriate mime type
Do you have any example? I think it already correct because the Laravel Telescope script it serve correctly
Some CDN/Caching service that might interfere?
That's probably an actual file on the file system. Not a CSS/JS file routed through Laravel
No CDN or Caching service config now.
Here current nginx.conf
https://gist.github.com/apinan-topcloud/38f601e54aff047d72a993c7e55c8e49
i has been apply this to my nginx.conf but it doesn't work
https://v2.filamentphp.com/tricks/fix-filament-assets-nginx
Filament
Fix Filament assets not loading in Nginx by Ida Bagus Gede Pramana ...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.