title: Grails Resources, 302s, SSL, and Chrome
body: <p>Grails 2.1.1 with the resources plugin.  </p>
  
  <p>I'm using the <a href="http://www.jstree.com/" rel="nofollow">jstree</a> library and it utilizes themes.  You specify a theme name in the config:</p>
  
  <pre><code>"themes":{
     "theme":"default",
     "dots":false,
     "icons":true
  }
  </code></pre>
  
  <p>And the JavaScript finds it relative to the library's path.  That means the URL is built and is relative, then gets added to the document.  For example, it might look like:</p>
  
  <pre><code>/a/js/jsTree/themes/default/styles.css
  </code></pre>
  
  <p>I have the following in my ApplicationResources.groovy:</p>
  
  <pre><code>tree {
      resource url: '/js/jsTree/1.0/_lib/jquery.cookie.js'
      resource url: '/js/jsTree/1.0/_lib/jquery.hotkeys.js'
      resource url: '/js/jsTree/1.0/jquery.jstree.js'
  }
  </code></pre>
  
  <p>When I deploy this on our server with SSL, on Firefox and Safari, I see the that styles.css being 302'd to the static path that the resources plugin does.</p>
  
  <pre><code>/a/static/js/jsTree/themes/default/styles.css
  </code></pre>
  
  <p>And then that new path is pulled in, and I can see it is coming over SSL.  However, in Chrome I see the 302 and then the new URL is trying to stream over non-SSL and Chrome is blocking it (silently even) so the tree styles do not render at all, which obviously makes it unusable.</p>
  
  <p>Sorry, but I cannot at this time make an example of this problem that anyone can publicly view.  I'm hoping someone else might have ran into this situation before.</p>