title: IIS and nginx/Varnish - Webforms can't load "WebResouce" over SSL?
body: <p>We have put up a varnish server in from of IIS. 
  We configured IIS to serve non SSL traffic to Varnish and then NGINX proxies everything for us in SSL (rewrites non SSL traffic to SSL) from Varnish local proxy.</p>
  
  <p>Everything seems to work fine except for a few of those <code>webresource</code> scripts.</p>
  
  <p>In the HTML the script tag is as follows. Using a relative path like my other scripts, ie jQuery, which load fine.</p>
  
  <pre><code>&lt;script src="/ScriptResource.axd?d=6uPUkgsnuI6bNNqsGNPwyYxfMKrscMZRBRF2qryQunH79WGeJKinT5LSOz4dgI3pMcYvAuAL2CF8edx8jqS5kzCUSBNhkgtxn779pz4r4s4-EUnJ08DyzAMEVy9czI-nbL_zTBJ0Y-62dvqDT5tm7XxUtSCilM9esKhQq3SfIxM1&amp;amp;t=ca758f3" type="text/javascript"&gt;
  </code></pre>
  
  <p>But then all browsers are saying the content is loaded from non secure and blocked</p>
  
  <p><a href="https://i.stack.imgur.com/LSe08.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LSe08.png" alt="enter image description here"></a></p>
  
  <p>Chrome's request headers</p>
  
  <p><a href="https://i.stack.imgur.com/9ZDJQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ZDJQ.png" alt="enter image description here"></a></p>
  
  <p>I did a fiddler to see what is going on. It seems like there is a redirect 301 on the script, form http to https.. ok, both load</p>
  
  <p><a href="https://i.stack.imgur.com/V4rNA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V4rNA.png" alt="enter image description here"></a></p>
  
  <p>But why on earth are browsing trying to load the scripts from <code>http://</code> is the script tag is set to relative?</p>
  
  <p>This only happens on these 3 webresouce files, all other scripts, non WebForm load just fine</p>