Skip to content
代码片段 群组 项目
提交 94c96cd4 编辑于 作者: Marin Jankovski's avatar Marin Jankovski
浏览文件

HTTP headers protect against MIME-sniffing, force https if enabled.

上级 e2dbe0fa
No related branches found
No related tags found
无相关合并请求
...@@ -8,6 +8,7 @@ v 6.5.0 ...@@ -8,6 +8,7 @@ v 6.5.0
- Add project visibility icons to dashboard - Add project visibility icons to dashboard
- Enable secure cookies if https used - Enable secure cookies if https used
- Protect users/confirmation with rack_attack - Protect users/confirmation with rack_attack
- Default HTTP headers to protect against MIME-sniffing, force https if enabled
v6.4.3 v6.4.3
- Don't use unicorn worker killer if PhusionPassenger is defined - Don't use unicorn worker killer if PhusionPassenger is defined
......
...@@ -161,6 +161,8 @@ def default_headers ...@@ -161,6 +161,8 @@ def default_headers
headers['X-Frame-Options'] = 'DENY' headers['X-Frame-Options'] = 'DENY'
headers['X-XSS-Protection'] = '1; mode=block' headers['X-XSS-Protection'] = '1; mode=block'
headers['X-UA-Compatible'] = 'IE=edge' 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 end
def add_gon_variables def add_gon_variables
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册