-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
fix(security): docsify serve
should only listen on localhost
#52
Conversation
Thanks for the PR 👍 |
perhaps we can add an optional flag for the |
In my testing the server was listening on In any case, the console message should not be hard-coded to say |
Strange 😕 I uses windows too but never faced this. Will try to re-create it if possible.
Yup, this need to be done. I would lean more towards the optional flag cause in general the default behavior of a CLI should be changed using flags. |
I don't really see any security concern here: https://serverfault.com/questions/78048/whats-the-difference-between-ip-address-0-0-0-0-and-127-0-0-1 Docsify is intended to be served to the public. The administrator any machine where Docsify is served will need to take care to restrict exposure of the site as they wish. To that end, having an option to specify the function (path, openInBrowser, port, livereloadPort, host = '0.0.0.0') { or similar. |
@solymosi Would you be willing to make that update? |
I've made the requested changes. Also added an |
I was initially made aware of the fact that Docsify actually listens on I think displaying the actual listen host (i.e. |
Any updates on this? |
Hey ! sorry for the delay, Lets do few things before merging it.
|
…s to `127.0.0.1`)
@anikethsaha Both done ✔️ |
I use an external machine for development, so this change is an inconvenience with little to no security benefit. |
It will be in for next release ! |
I need this feature to run docsify on a whitelisted hostname. Any updates? |
The local development server spawned by
docsify serve
listens on all interfaces by default. This might be a security concern when working on an insecure local network.This PR restricts the server to
localhost
/127.0.0.1
.