Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect http requests to https with spdy #293

Open
SamuelGaona opened this issue Nov 6, 2016 · 6 comments
Open

Redirect http requests to https with spdy #293

SamuelGaona opened this issue Nov 6, 2016 · 6 comments
Labels

Comments

@SamuelGaona
Copy link

How do I get to work this?

@muety
Copy link

muety commented Nov 13, 2016

+1

@dannluciano
Copy link

I agree that you need do this in webserver (nginx/apache)

A example in nginx:

server {
       listen         80;
       server_name    my.domain.com;
       return         301 https://$server_name$request_uri;
}

server {
       listen         443 ssl;
       server_name    my.domain.com;

       [....]
}

@codepunkt
Copy link

Some of us might not want to have an apache or nginx in front of our node app. How can this be done using spdy directly?

@muety
Copy link

muety commented Jan 2, 2017

Some of us might not want to have an apache or nginx in front of our node app. How can this be done using spdy directly?

Add a second server listener using the "normal" node http (1.1) package on port 80, which returns a 301 with https://youraddress for every request.

@codepunkt
Copy link

@n1try sounds good, thanks :)

@daviddias
Copy link
Member

daviddias commented Apr 12, 2017

That is a way to do it, but it might not be the solution you are looking for since it will stop you from using spdy/h2 benefits, i.e: you won't be able to do push streams.

This module API maps to Node.js http module, the example here https://github.com/spdy-http2/node-spdy#examples should be the answer you are looking for, have you tried it so far?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants