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

When using https display https://common_name:8080/ as one of the valid hostnames #670

Open
bramp opened this issue Dec 27, 2020 · 1 comment · May be fixed by #675
Open

When using https display https://common_name:8080/ as one of the valid hostnames #670

bramp opened this issue Dec 27, 2020 · 1 comment · May be fixed by #675

Comments

@bramp
Copy link

@bramp bramp commented Dec 27, 2020

This is a feature request, to display the valid SSL name (from the certificate) when starting up the server.

Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.

$ http-server -S

Starting up http-server, serving ./ through https
Available on:
  https://127.0.0.1:8080
  https://192.168.77.123:8080

What did you expect to happen?

$ http-server -S

Starting up http-server, serving ./ through https
Available on:
  https://127.0.0.1:8080
  https://192.168.77.123:8080
  https://the_name_in_cert.pem:8080

If the issue is a feature request, what is the motivation / use case for it?

To make it easier to:

  1. You are using the correct SSL cert
  2. Easier to click though to a URL that has the valid cert. Both 127.0.0.1 and 192.168.77.123 would display certificate errors.

Tell us about your environment

  • exact http-server version: http-server v0.12.3
  • Node version: Node.js v15.5.0.
  • Platform: MacOs

Other information (related issues, suggestions for a fix, etc):

@sirajulm
Copy link

@sirajulm sirajulm commented Jan 6, 2021

An option to set the hostname would also work :)

bramp added a commit to bramp/http-server that referenced this issue Jan 31, 2021
…from the SSL certificate that is being used.

This avoids SSL errors when going to the host (such as a IP address) that doesn't match the name in the certificate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants