Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Remove duplicate headers in Reponse #251

Open
theskumar opened this issue Aug 11, 2017 · 2 comments
Open

Bug: Remove duplicate headers in Reponse #251

theskumar opened this issue Aug 11, 2017 · 2 comments

Comments

@theskumar
Copy link
Member

Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Fri, 11 Aug 2017 11:31:19 GMT
REQUEST_ID: e3a346aae36b41549f6613117a2bde18
Server: nginx
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
strict-transport-security: max-age=600000; includeSubDomains
x-content-type-options: nosniff
x-xss-protection: 1; mode=block

Currently it returns, see duplicates for:

X-Frame-Options
x-xss-protection
@vikalpj
Copy link
Contributor

vikalpj commented Oct 25, 2017

the duplicate header are because both Django & Nginx both are adding these headers
Django -

SECURE_CONTENT_TYPE_NOSNIFF = True

Nginx -

Django headers are needed only when we are deploying to service like Heroku.

Suggestions - there can be a variable in cookie-cutter config to ask if heroku scripts are needed and based on that we can alter the variable.
or
We can have these variables to be picked from .env and In .env.sample we can define in comments when this need to be set to True of False.

@theskumar
Copy link
Member Author

To start off, Django settings should be disabled if using Ansible (+ controllable with .env, would be nice to have), later can we can have an explicit choice b/w Heroku and AWS.

Subsequently, we would be dropping support of Heroku.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants