title: Grails referring js in https
body: <p>I have developed a Javascript library, which can be used in some of my other sites. It's a grails application. The grails application can be reach in HTTPS. However, there is a problem when referencing the JS file in HTTPS.</p>
  
  <p>When including the JS library like:</p>
  
  <pre><code>https://foo.my.domain/appcontext/static/js/myjslib.js
  </code></pre>
  
  <p>Grails redirects this request to:</p>
  
  <pre><code>http://foo.my.domain/appcontext/static/bundle-bundle_application_defer.js
  </code></pre>
  
  <p>Please note the HTTPS -> HTTP which causes "unsecure" warnings, and the js lib is blocked in e.g. chrome and IE.</p>
  
  <p>If I reference </p>
  
  <pre><code>https://foo.my.domain/appcontext/static/bundle-bundle_application_defer.js
  </code></pre>
  
  <p>directly, it works fine!</p>
  
  <p>How can I force grails to NOT make this https -> http redirect, when referencing static content?</p>