Skip to content

Setting CSPΒ #644

@Pomax

Description

@Pomax

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'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions