Search code examples
grailshttps

Grails: HTTPS and blocked content


I have a grails app the is running on Tomcat and we are using SSL. The problem is that some of our javascript files that are being included via application resources are being blocked as insecure content:

[blocked] The page at https://mysite.com/supplementalInformation/edit?rquid=E24CF6C9-4DEF-48D3-B83C-DC4404F9DC78 ran insecure content from http://mysite.com/static/js/jquery-1.7.2.min.js.

How do I get this to not happen?


Solution

  • Resources plugin generates absolute links. Try to set serverUrl="https://mysite.com/" in config.groovy. This will fix your problem.
    Or better take a look here. The intresting param for you is linkOverride. Define it with https protocol for your static resources.