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
f986d5e0bf22
Commit
f986d5e0
authored
Mar 25, 2015
by
Stan Hu
Browse files
Set Application controller default URL options to ensure all url_for calls are consistent
Closes #1249
parent
15569c0f5b1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
f986d5e0
Please view this file on the master branch, on stable branches it's out of date.
v 7.10.0 (unreleased)
- Set Application controller default URL options to ensure all url_for calls are consistent (Stan Hu)
- Allow HTML tags in Markdown input
- Include missing events and fix save functionality in admin service template settings form (Stan Hu)
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
...
...
app/controllers/application_controller.rb
View file @
f986d5e0
...
...
@@ -178,6 +178,18 @@
response
.
headers
[
"Expires"
]
=
"Fri, 01 Jan 1990 00:00:00 GMT"
end
def
default_url_options
if
!
Rails
.
env
.
test?
port
=
Gitlab
.
config
.
gitlab
.
port
unless
Gitlab
.
config
.
gitlab_on_standard_port?
{
host:
Gitlab
.
config
.
gitlab
.
host
,
protocol:
Gitlab
.
config
.
gitlab
.
protocol
,
port:
port
,
script_name:
Gitlab
.
config
.
gitlab
.
relative_url_root
}
else
super
end
end
def
default_headers
headers
[
'X-Frame-Options'
]
=
'DENY'
headers
[
'X-XSS-Protection'
]
=
'1; mode=block'
...
...
Write
Preview
Supports
Markdown
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