Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from geektechdude/csp-header-in-one
Browse files Browse the repository at this point in the history
Csp header in one
  • Loading branch information
geektechdude authored Jun 29, 2023
2 parents 7e5d4de + 551a842 commit 2868f95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions flaskwebapp/app/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ def headers(response):
# https://flask.palletsprojects.com/en/2.3.x/security/#security-headers
response.headers['X-Content-Type-Options'] = 'nosniff'
response.headers['X-Frame-Options'] = 'SAMEORIGIN'
response.headers['Content-Security-Policy'] = "default-src 'self';"
response.headers['Content-Security-Policy'] = "frame-ancestors 'self';"
response.headers['Content-Security-Policy'] = "form-action 'self';"
response.headers['Content-Security-Policy'] = "default-src 'self'; \
frame-ancestors 'self'; form-action 'self';"
response.headers['Server'] = "GeekTechStuff"
return response

Expand Down
5 changes: 2 additions & 3 deletions flaskwebapp/app/main/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ def headers(response):
# https://flask.palletsprojects.com/en/2.3.x/security/#security-headers
response.headers['X-Content-Type-Options'] = 'nosniff'
response.headers['X-Frame-Options'] = 'SAMEORIGIN'
response.headers['Content-Security-Policy'] = "default-src 'self';"
response.headers['Content-Security-Policy'] = "frame-ancestors 'self';"
response.headers['Content-Security-Policy'] = "form-action 'self';"
response.headers['Content-Security-Policy'] = "default-src 'self'; \
frame-ancestors 'self'; form-action 'self';"
response.headers['Server'] = "GeekTechStuff"
return response

Expand Down
5 changes: 2 additions & 3 deletions flaskwebapp/app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ def headers(response):
# https://flask.palletsprojects.com/en/2.3.x/security/#security-headers
response.headers['X-Content-Type-Options'] = 'nosniff'
response.headers['X-Frame-Options'] = 'SAMEORIGIN'
response.headers['Content-Security-Policy'] = "default-src 'self';"
response.headers['Content-Security-Policy'] = "frame-ancestors 'self';"
response.headers['Content-Security-Policy'] = "form-action 'self';"
response.headers['Content-Security-Policy'] = "default-src 'self'; \
frame-ancestors 'self'; form-action 'self';"
response.headers['Server'] = "GeekTechStuff"
return response

Expand Down

0 comments on commit 2868f95

Please sign in to comment.