diff options
author | Giovane <giovaneliberato@gmail.com> | 2015-09-03 18:37:03 -0300 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2015-09-03 18:39:47 -0300 |
commit | 7f600c988e0a1626ca0e24a1d7a1fa7797771915 (patch) | |
tree | d3d5b5a8cdc9a480ab289c92335cbb239b0d43ae /service/pixelated/config | |
parent | 19cda9ca7aa1aca18f61ebf659fc490f8ad4c15a (diff) |
#304 Adds PixelatedSite class to hold custom request configuration and remove foundation inline javascript.
Diffstat (limited to 'service/pixelated/config')
-rw-r--r-- | service/pixelated/config/site.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/service/pixelated/config/site.py b/service/pixelated/config/site.py new file mode 100644 index 00000000..c6e55102 --- /dev/null +++ b/service/pixelated/config/site.py @@ -0,0 +1,11 @@ +from twisted.web.server import Site, Request + + +class AddCSPHeaderRequest(Request): + def process(self): + self.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'") + Request.process(self) + + +class PixelatedSite(Site): + requestFactory = AddCSPHeaderRequest |