Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
156a525c97ea
Commit
94c96cd4
authored
Dec 30, 2013
by
Marin Jankovski
Browse files
HTTP headers protect against MIME-sniffing, force https if enabled.
parent
7034de8e739f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
156a525c
...
...
@@ -8,6 +8,7 @@ v 6.5.0
- Add project visibility icons to dashboard
- Enable secure cookies if https used
- Protect users/confirmation with rack_attack
- Default HTTP headers to protect against MIME-sniffing, force https if enabled
v6.4.3
- Don't use unicorn worker killer if PhusionPassenger is defined
...
...
app/controllers/application_controller.rb
View file @
156a525c
...
...
@@ -161,6 +161,8 @@ def default_headers
headers
[
'X-Frame-Options'
]
=
'DENY'
headers
[
'X-XSS-Protection'
]
=
'1; mode=block'
headers
[
'X-UA-Compatible'
]
=
'IE=edge'
headers
[
'X-Content-Type-Options'
]
=
'nosniff'
headers
[
'Strict-Transport-Security'
]
=
'max-age=31536000; includeSubDomains'
if
Gitlab
.
config
.
gitlab
.
https
end
def
add_gon_variables
...
...
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