add security headers for browser

harden website
This commit is contained in:
Rotzbua 2018-10-01 13:43:30 +02:00 committed by Florian Festi
parent 0269037eb3
commit 10ba53c5a1
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ Create boxes and more with a laser cutter!
return self.serveStatic(environ, start_response)
status = '200 OK'
headers = [('Content-type', 'text/html; charset=utf-8')]
headers = [('Content-type', 'text/html; charset=utf-8'), ('X-XSS-Protection', '1; mode=block'), ('X-Content-Type-Options', 'nosniff'), ('x-frame-options', 'SAMEORIGIN'), ('Referrer-Policy', 'no-referrer')]
d = cgi.parse_qs(environ['QUERY_STRING'])
name = environ["PATH_INFO"][1:]