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
Boxiang Sun
gitlab-ce
Commits
75e718f2
Commit
75e718f2
authored
Jan 08, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate HTTP URLs for custom Pages domains when appropriate
parent
2c66b942
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/models/pages_domain.rb
app/models/pages_domain.rb
+1
-1
changelogs/unreleased/28260-fix-pages-custom-domain-url.yml
changelogs/unreleased/28260-fix-pages-custom-domain-url.yml
+5
-0
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+1
-1
No files found.
app/models/pages_domain.rb
View file @
75e718f2
...
@@ -27,7 +27,7 @@ class PagesDomain < ActiveRecord::Base
...
@@ -27,7 +27,7 @@ class PagesDomain < ActiveRecord::Base
def
url
def
url
return
unless
domain
return
unless
domain
if
certificate
if
certificate
.
present?
"https://
#{
domain
}
"
"https://
#{
domain
}
"
else
else
"http://
#{
domain
}
"
"http://
#{
domain
}
"
...
...
changelogs/unreleased/28260-fix-pages-custom-domain-url.yml
0 → 100644
View file @
75e718f2
---
title
:
Generate HTTP URLs for custom Pages domains when appropriate
merge_request
:
16279
author
:
type
:
fixed
spec/models/pages_domain_spec.rb
View file @
75e718f2
...
@@ -68,7 +68,7 @@ describe PagesDomain do
...
@@ -68,7 +68,7 @@ describe PagesDomain do
subject
{
domain
.
url
}
subject
{
domain
.
url
}
context
'without the certificate'
do
context
'without the certificate'
do
let
(
:domain
)
{
build
(
:pages_domain
)
}
let
(
:domain
)
{
build
(
:pages_domain
,
certificate:
''
)
}
it
{
is_expected
.
to
eq
(
'http://my.domain.com'
)
}
it
{
is_expected
.
to
eq
(
'http://my.domain.com'
)
}
end
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