Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
76e96878
Commit
76e96878
authored
Mar 03, 2017
by
Paweł Chojnacki
Committed by
Marin Jankovski
Mar 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop setting Strict-Transport-Securty header from within the app
parent
a9a58156
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+0
-4
changelogs/unreleased/3440-remove-hsts-header.yml
changelogs/unreleased/3440-remove-hsts-header.yml
+4
-0
doc/update/8.17-to-9.0.md
doc/update/8.17-to-9.0.md
+24
-0
lib/support/nginx/gitlab-ssl
lib/support/nginx/gitlab-ssl
+3
-0
No files found.
app/controllers/application_controller.rb
View file @
76e96878
...
...
@@ -122,10 +122,6 @@ class ApplicationController < ActionController::Base
headers
[
'X-XSS-Protection'
]
=
'1; mode=block'
headers
[
'X-UA-Compatible'
]
=
'IE=edge'
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
# Enabling HSTS for non-standard ports would send clients to the wrong port
if
Gitlab
.
config
.
gitlab
.
https
&&
Gitlab
.
config
.
gitlab
.
port
==
443
headers
[
'Strict-Transport-Security'
]
=
'max-age=31536000'
end
end
def
validate_user_service_ticket!
...
...
changelogs/unreleased/3440-remove-hsts-header.yml
0 → 100644
View file @
76e96878
---
title
:
Stop setting Strict-Transport-Securty header from within the app
merge_request
:
author
:
doc/update/8.17-to-9.0.md
0 → 100644
View file @
76e96878
#### Nginx configuration
Ensure you're still up-to-date with the latest NGINX configuration changes:
```
sh
cd
/home/git/gitlab
# For HTTPS configurations
git diff origin/8-17-stable:lib/support/nginx/gitlab-ssl origin/9-0-stable:lib/support/nginx/gitlab-ssl
# For HTTP configurations
git diff origin/8-17-stable:lib/support/nginx/gitlab origin/9-0-stable:lib/support/nginx/gitlab
```
If you are using Strict-Transport-Security in your installation to continue using it you must enable it in your Nginx
configuration as GitLab application no longer handles setting it.
If you are using Apache instead of NGINX please see the updated [Apache templates].
Also note that because Apache does not support upstreams behind Unix sockets you
will need to let gitlab-workhorse listen on a TCP port. You can do this
via [/etc/default/gitlab].
[
Apache templates
]:
https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache
[
/etc/default/gitlab
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/9-0-stable/lib/support/init.d/gitlab.default.example#L38
lib/support/nginx/gitlab-ssl
View file @
76e96878
...
...
@@ -82,6 +82,9 @@ server {
##
# ssl_dhparam /etc/ssl/certs/dhparam.pem;
## [Optional] Enable HTTP Strict Transport Security
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
## Individual nginx logs for this GitLab vhost
access_log /var/log/nginx/gitlab_access.log;
error_log /var/log/nginx/gitlab_error.log;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment