-
Notifications
You must be signed in to change notification settings - Fork 985
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
Marking the server as secure when only using httpsServerOptions #1605
Comments
I'd like to help out where I can on this. A few Qs: Should this be applied to all maintained versions? Which versions are still maintained when considering [Critical] labels? I noted during a code review that the path prior to the |
Hello @kevinpeno, sorry for the radio silence! Core team has been swamped on other things this past month. For something like this that is primarily ergonomics, we can aim to fix on the latest major version and not worry about the older versions. Thank you very much for the offer to help! I think your approach sounds great! I'd keep the shim in place for 7.x and we can remove it for 8.x. Deprecation warning is also 💯 Any concerns @hekike ? |
Sounds good to me. |
Alright. I'll get a PR together. Thanks for the feedback! |
Bug Report
When creating a server by only using
httpsServerOptions
, the server is not mark as secure. This cause the subsequent listen to report usinghttp://
instead ofhttps://
.This doesn't affect servers created while declaring
httpsServerOptions
directly in the options object, only if you put them all inhttpsServerOptions
. Also, as far as I know, it doesn't seem to affect functionality, because clients can still connect via HTTPS and thereq.isSecure()
method returnstrue
. It's only for fetching the URL from theurl
property of the restify server that seems to be affected.Restify Version
6.3.4
Node.js Version
9.5.0
Expected behaviour
Should be listening on https://127.0.0.1:8443.
Actual behaviour
Is listening on http://127.0.0.1:8443.
Repro case
Cause
The cause is found in
/lib/server.js
, at line 169. When creating the HTTPS server,this.secure
should be set totrue
.Are you willing and able to fix this?
Yes, check this commit: https://github.com/wolfmah/node-restify/commit/9573125008a0c05bb8bf4152f2258dafd66631d9
The text was updated successfully, but these errors were encountered: