I am using server lighttpd/1.4.53. I want to add the HTTP header "Content-Security-Policy" for my server. I have a few questions related to this:
- As the documentation of this header suggests, most directives are domain based. For example,
Content-Security-Policy: default-src 'self'; script-src *.example.com;
Is there a way to make this IP based? Or can we make 'self' consider the server's own IP? - How to check the CSP version that is used by the browser and server? Does CSP use the same version as the parent HTTP protocol itself?
Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src