But then, integrating the custom protocol might not be possible right? The 
custom protocol is used for admin purposes. This is currently a python 
codebase. We are porting it to nodejs. So the client wants to keep the 
architecture same.

On Wednesday, 6 February 2013 19:04:11 UTC-8, bryce...@gmail.com wrote:
>
> Or better yet, redirect :80 to https://yourserver.com and wholly avoid 
> mixed secure/insecure code paths.
>
>   // a simple listener to redirect 80 to https
>   http.createServer(function (req, res) {
>     res.writeHead(301, {"Location": "https://"; + HOST + req.url});
>     res.end();
>   }).listen(80);
>
>
> On Wed, Feb 6, 2013 at 4:21 PM, Isaac Schlueter <i...@izs.me <javascript:>
> > wrote:
>
>> Why would you want to do this?
>>
>> Why wouldn't you want http on :80 and https on :443, so that you have
>> https://yourserver.com and http://yourserver.com instead of
>> http://blah.com and https://blah.com:80/ which looks funny and
>> strange?
>>
>> Do something like this:
>>
>> http.createServer(handler).listen(80);
>> https.createServer(keysAndStuff, handler).listen(443);
>> function handler(req, res) {
>>   res.end('Hello, this is served to both http and https!\n');
>> }
>>
>>
>> On Wed, Feb 6, 2013 at 1:07 PM, Bradley Meck 
>> <bradle...@gmail.com<javascript:>> 
>> wrote:
>> > A long time ago I built a proof of concept for something like this:
>> > https://github.com/bmeck/kitsune
>> >
>> > After thinking about maintainability I decided to avoid doing this sort 
>> of
>> > behavior but left the code up as an example.
>> >
>> > --
>> > --
>> > Job Board: http://jobs.nodejs.org/
>> > Posting guidelines:
>> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> > You received this message because you are subscribed to the Google
>> > Groups "nodejs" group.
>> > To post to this group, send email to nod...@googlegroups.com<javascript:>
>> > To unsubscribe from this group, send email to
>> > nodejs+un...@googlegroups.com <javascript:>
>> > For more options, visit this group at
>> > http://groups.google.com/group/nodejs?hl=en?hl=en
>> >
>> > ---
>> > You received this message because you are subscribed to the Google 
>> Groups
>> > "nodejs" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an
>> > email to nodejs+un...@googlegroups.com <javascript:>.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to nod...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to nodejs+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to