Jeff,

You just leave off the "http:".  Here is an example:

<html>
<head>
 <title>Test</title>
 <script type="text/javascript" src="//mysite.com/link/to/file.js"> </script>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>



I find this method useful for loading javascript and css files when you don't 
know if a page may be loaded in a secure context.

I don't know anything about uWSGI to help you there.  Sorry.

- Devon


On Jun 14, 2012, at 9:18 AM, Jeff Van Voorst wrote:

> On 6/14/12 8:12 AM, Carlo Pires wrote:
>>> I am looking to use mongrel2 with SSL.  I would like to add a field to
>>> the headers sent to the handlers notifying them whether or not the
>>> connection is using SSL.  My reason for doing this is for redirects the
>>> handler needs to know whether to use http or https when building the 
>> url.
>> 
>> You can prefix redirected urls with "//" and let the browser to solve 
>> this for you.
> I haven't done this before, could you please give an example of such a 
> prefixed url?
> 
> The web framework I use builds relative urls.  The handler is a uWSGI 
> process, and as far as I can tell, uWSGI builds the full url.
> 
>> You can also configure two servers in mongrel2 one for SSL and another 
>> for non SSL, each one using a different handler class which could add 
>> the such extra information needed.
> In my case, all pages should be hosted over SSL.
> 
> --Jeff

Reply via email to