grails资源未通过https加载

grails资源未通过https加载,grails,grails-plugin,Grails,Grails Plugin,我将grails与资源插件和引导一起使用!加载页面时,我收到一个ssl错误,因为我的一些资源没有通过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

我将grails与资源插件和引导一起使用!加载页面时,我收到一个ssl错误,因为我的一些资源没有通过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.
这个文件glyphions-halflings-regular.woff是在引导资源中定义的,所以我不想在文件中硬编码https url

我如何告诉我的系统grails或资源插件通过https加载文件

谢谢你的帮助


托马斯把它修好了。我不知道我的文件有什么问题

    //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'

我在使用grails的资源插件和引导程序时也遇到了同样的不安全内容问题。 为了解决这个问题,我刚刚在config.groovy中完成了以下操作:

grails.plugin.springsecurity.secureChannel.useHeaderCheckChannelSecurity = true
grails.plugin.springsecurity.portMapper.httpPort = 80
grails.plugin.springsecurity.portMapper.httpsPort = 443
grails.plugin.springsecurity.auth.forceHttps = true
grails.plugin.springsecurity.secureChannel.definition = [ '/**': 'REQUIRES_SECURE_CHANNEL']

您尝试过在Config.groovy中使用grails.resources.adhoc.includes=['/fonts/**']吗?谢谢您的建议。我试过了,结果还是一样。在另一个测试中,我尝试将它添加到grails.resources.adhoc.patterns=['/images/*'、'/css/*'、'/js/*'、'/plugins/*'、'/font/*']中,但它也不起作用。我仍然在浏览器中遇到上述错误。还有其他建议吗?谢谢你,托马斯