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

Adding an option to launch a HTTPS server #74

Merged
merged 1 commit into from Aug 28, 2014

Conversation

Yomguithereal
Copy link
Contributor

Adding several options concerning HTTPS:

  • -S / --ssl: launch a https server
  • -C / --cert: path to cert file (default: cert.pem)
  • -K / --key: path to key file (default: key.pem)

The arguments are uppercase not to collide with the current existing one.

The idea behind this pull request is to enable developers to fastly launch a https server for dev purposes (typically when working on Speech Recognition APIs or on code injection within HTTPS pages).

How to create dummy cert and key files for dev

openssl genrsa -out key.pem 4096
openssl req -new -key key.pem -out csr.pem -subj "/C=US/ST=California/L=San Francisco/O=Local-Company/OU=dev/CN=localhost/emailAddress=test@test.com"
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem

Then go to chrome settings to register your key (advanced settings --> HTTPS/SSL --> Manage Certificates)
Click Import and add your cert.pem file to register your development certificate and not be bothered anymore by chrome warnings.

Or use the --ignore-certificate-errors option in Chromium if you are in a hurry.

@Yomguithereal
Copy link
Contributor Author

Would be helping for issue #36.

@mencio
Copy link

mencio commented Jun 11, 2014

UP!

@pierrewrs
Copy link

Great.

@@ -21,6 +21,11 @@ if (argv.h || argv.help) {
" -o Open browser window after staring the server",
" -c Set cache time (in seconds). e.g. -c10 for 10 seconds.",
" To disable caching, use -c-1.",
"",
" -S --ssl Enable https.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem like these being lowercase would fit the existing code style a bit better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the -S or every one (would need to find another letter then)?

@n1313
Copy link

n1313 commented Aug 25, 2014

This would be such a welcome change.

indexzero added a commit that referenced this pull request Aug 28, 2014
Adding an option to launch a HTTPS server
@indexzero indexzero merged commit 89af207 into http-party:master Aug 28, 2014
@indexzero indexzero mentioned this pull request Mar 19, 2015
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.

None yet

6 participants