franciscop / server

:desktop_computer: Simple and powerful server for Node.js
https://serverjs.io/
MIT License
3.56k stars 171 forks source link

Allow disabling public #121

Closed reed1 closed 4 years ago

reed1 commented 4 years ago

Describe the bug For now public option defaults to 'public'. There's a section in the docs to disable public, but it doesn't work as intended:

To Reproduce Steps to reproduce the behavior:

  1. install server npm i server
  2. setup simple index.js with {public: false} or {public: ''} as the server option
  3. the bug will reproduce as written above

Expected behavior

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

franciscop commented 4 years ago

Hey thanks for the PR! Totally agreed, this looks really dangerous. Couple of suggestions:

I'm going to evaluate it ASAP and might merge it without those changes because at a glance this seems very important.

reed1 commented 4 years ago

Ah this only intended to give you an idea, you can just close this and make changes as needed. Thanks for the framework btw

franciscop commented 4 years ago

Merging it for now, will improve it locally.

franciscop commented 4 years ago

Thanks for the PR!

franciscop commented 4 years ago

Published server@1.0.20 🎉