-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplicate security headers (#8726)
Our NGINX configuration adds some headers to all responses, but Django already outputs these headers via `SecurityMiddleware` and `XFrameOptionsMiddleware`. So we end up with duplicate headers in the response, which has undefined semantics (and is just plain confusing). I don't want to remove these headers from the Django configuration (because I want them to still be output when run via the development server) _or_ from the NGINX configuration (because they should still be added when serving static files). So instead, keep them in both places, but let NGINX add each header only if the upstream server has not already added one. Also, update the referrer policy in Django to match the one we're using elsewhere.
- Loading branch information
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Fixed | ||
|
||
- Fixed security header duplication in HTTP responses from the backend | ||
(<https://github.com/cvat-ai/cvat/pull/8726>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters