BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
98c66b50
Commit
98c66b50
authored
Jul 22, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'use_fullpath' into 'master'
If referer in request is incorrect use fullpath Fixes #1444 See merge request !982
parents
4f47eaf9
b4217500
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
sessions_controller.rb
app/controllers/sessions_controller.rb
+12
-3
redirects.rb
features/steps/project/redirects.rb
+1
-0
No files found.
app/controllers/sessions_controller.rb
View file @
98c66b50
class
SessionsController
<
Devise
::
SessionsController
def
new
if
request
.
referer
.
present?
store_location_for
(
:redirect
,
URI
(
request
.
referer
).
path
)
end
redirect_url
=
if
request
.
referer
.
present?
referer_uri
=
URI
(
request
.
referer
)
if
referer_uri
.
host
==
Gitlab
.
config
.
gitlab
.
host
referer_uri
.
path
else
request
.
fullpath
end
else
request
.
fullpath
end
store_location_for
(
:redirect
,
redirect_url
)
super
end
...
...
features/steps/project/redirects.rb
View file @
98c66b50
...
...
@@ -17,6 +17,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
end
step
'I should see project "Community" home page'
do
Gitlab
.
config
.
gitlab
.
stub
(
:host
).
and_return
(
"www.example.com"
)
within
'.project-home-title'
do
page
.
should
have_content
'Community'
end
...
...
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