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

Added HTTP to HTTPS redirect for servers using SSL #799

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

CannonBallz
Copy link

This change allows the server to redirect all http traffic on a specified port to the port used for SSL connections. To enable this option you will need to add two extra options to the server block for SSL servers in config.js, the following example details the options (using standard https and http ports for clarity but not required):

conf.servers.push({
port: "443",
address: "0.0.0.0",
ssl: true,
ssl_key: "example.key",
ssl_ca: "example.ca",
ssl_cert: "example.crt",
// HTTP redirect options
http_redirect: true,
http_redirect_port: "80"
});

(Also updated the spdy require to use https instead of spdy to help deal with web browsers not liking spdy)

This change allows the server to redirect all http traffic on a specified port to the port used for SSL connections.  To enable this option you will need to add two extra options to the server block for SSL servers in config.js, the following example details the options (using standard https and http ports for clarity but not required):

conf.servers.push({
    port:     "443",
    address: "0.0.0.0",
    ssl:   true,
    ssl_key: "example.key",
    ssl_ca: "example.ca",
    ssl_cert: "example.crt",
    // Custom HTTP redirect options
    http_redirect: true,
    http_redirect_port: "80"
});
@LouisT
Copy link
Contributor

LouisT commented Jan 1, 2016

The change from SPDY to https isn't a good one. SPDY is the next step forward in the SSL system; reverting to https just to fix old outdated/broken browsers isn't the correct way to handle this.

@CannonBallz
Copy link
Author

This change is actually to fix it in new browsers as the major players seem to be migrating away from SPDY in favour of HTTP/2:
http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html

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

Successfully merging this pull request may close these issues.

2 participants