Search code examples
grailsgrails-plugin

grails resource not loaded via https


I am using grails with the resources plugin and bootstrap! When loading a page I get an ssl error because some of my resources are not loaded via https:

The page at 'https://localhost/blogpost/10' was loaded over HTTPS, but displayed
insecure content from 'resource:/fonts/glyphicons-halflings-regular.woff': this
content should also be loaded over HTTPS.

This file (glyphicons-halflings-regular.woff) is defined in the bootstrap resources so I don't want to hardcode the https url in the file.

How can I tell my system (either grails or the resource plugin) to load the file via https?

Thanks for your help.

Thomas


Solution

  • This fixed it. Don't know what the problem in my files is ...

        //resource url:'js/bootstrap.min.js'
        //resource url:'css/bootstrap.min.css'
        resource url:'https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'
        resource url:'https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'