Home Grails 2.3.7 HTTPS disable resource hashing for a particular file
Reply: 0

Grails 2.3.7 HTTPS disable resource hashing for a particular file

user1559 Published in June 21, 2018, 6:28 am

I use HAProxy for load-balancing and ssl termination. Behind it I have several Grails apps, one of which is a sort of CMS for semi-technical users.


When the user links to a Javascript library in the CMS like this:

<link href="/js/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" />

They get redirected by Grails to the hashed version:


The issue is that the browser sees the redirect to an insecure page, and doesn't actually load the javascript.

How do I allow users to access the resources under /web-app/js without having them redirected to the hashed version?

What I think I need is either:

1) Some way of telling Grails that it either should not redirect to the hashed static version via some kind of parameter in the url (?hash=no), it should just serve the Javascript file.

2) Or the request should redirect to the https or http version, depending on what protocol accessed it.


I am using Grails version is 2.3.7 and resources is 1.2.7.

I do like the benefits that the hashing provides, and it works well anywhere I can use the resource plugin, but would like to skip it in these specific instances.

Updating to Grails 2.4.2 and using the asset pipeline plugin would likely solve this, but also take more time than I want to spend debugging Javascript right now.

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO