Home Grails 3 Asset Pipeline in production producing wrong URLs and 404ing
Reply: 1

Grails 3 Asset Pipeline in production producing wrong URLs and 404ing

OsaSoft
1#
OsaSoft Published in 2017-11-05 16:46:16Z

So, I just tried releasing a 3.2.6 web app in production mode (war on tomcat) and all assets are 404ing.

When I open the unpacked folder in tomcat webapps, under assets i see all the js and css files fine.

After some digging I found the asset pipeline is hrefing the files as /app-name/assets/..., but my app is running on a root domain, so when I tried /assets/something.css I got the file fine. I've serverUrl set for production properly as https://example.com/

I couldn't find anything on this in the Asset Pipeline docs. Any help is appreciated.


Additional info about production setup: app in tomcat is running under /app-name/ but theres an nginx reverse proxy set up for example.com/ for this.

OsaSoft
2#
OsaSoft Reply to 2017-11-05 17:27:48Z

Alright, this fixed it: application.yml: assets.url: https://example.com/assets/

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.398307 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO