http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Setting CSP

Open Pomax opened this issue 5 years ago • 6 comments

Is there a way to set CSP in a similar way to setting CORS, or more generically, is there a way to manually specify a batch of headers to send with each response? Having to actually write a complete Node based server solution just to test that a page works with CSP in place is really silly if http-server would allow that kind of testing with a one line, e.g.

> http-server -p 8000 --cors --csp="default-src 'self'; img-src *; media-src example.com; script-src 'self'"

Pomax avatar Aug 05 '20 17:08 Pomax

Can I work on a PR for Hacktoberfest?

ronaldohoch avatar Oct 16 '20 03:10 ronaldohoch

probably won't do much: I submitted a PR in August, and no one's even looked at it yet. There's 45 open pull requests, and all signs that the maintainers have abandoned this project.

Pomax avatar Oct 16 '20 05:10 Pomax

@ronaldohoch go for it! I opted-in this project to Hacktoberfest, so anything you submit will count after the maturity period. The current maintainer team is quite busy with other things, but I'm trying to get things moving again

thornjad avatar Oct 16 '20 15:10 thornjad

https://github.com/http-party/http-server/pull/687 or #282 Would solve this Ground was laid in #28 but was missing the cli options

This is a much requested feature:

Related: #684 #281

Tofandel avatar Jul 23 '21 15:07 Tofandel

This issue has been inactive for 180 days

github-actions[bot] avatar Apr 10 '22 12:04 github-actions[bot]