http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.58k stars 1.49k forks source link

--cors usage is incorrect in the documentation #856

Open sandeep-vedam opened 1 year ago

sandeep-vedam commented 1 year ago

--cors | Enable CORS via the Access-Control-Allow-Origin header The above documentation seems to be incorrect and it is confusing. As we can see through the code, that --cors will enable the Access-Control-Allow-Origin header and also the value set is assigned to the Access-Control-Allow-Headers . Possible values: should be like here --cors='X-Custom-Header'

Here is the line that supports above: https://github.com/http-party/http-server/blob/master/lib/http-server.js#L101-L107

github-actions[bot] commented 11 months ago

This issue has been inactive for 180 days