Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
host
Smilodon
Commits
41ef277d
Commit
41ef277d
authored
Nov 28, 2016
by
Eugen
Committed by
GitHub
Nov 28, 2016
Browse files
Fix URLs in ApplicationController.renderer
parent
5b076cba
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/initializers/ostatus.rb
View file @
41ef277d
port
=
ENV
.
fetch
(
'PORT'
)
{
3000
}
port
=
ENV
.
fetch
(
'PORT'
)
{
3000
}
host
=
ENV
.
fetch
(
'LOCAL_DOMAIN'
)
{
"localhost:
#{
port
}
"
}
https
=
ENV
[
'LOCAL_HTTPS'
]
==
'true'
Rails
.
application
.
configure
do
config
.
x
.
local_domain
=
ENV
.
fetch
(
'LOCAL_DOMAIN'
)
{
"localhost:
#{
port
}
"
}
config
.
x
.
hub_url
=
ENV
.
fetch
(
'HUB_URL'
)
{
'https://pubsubhubbub.superfeedr.com'
}
config
.
x
.
use_https
=
ENV
[
'LOCAL_HTTPS'
]
==
'true'
config
.
x
.
local_domain
=
host
config
.
x
.
hub_url
=
ENV
.
fetch
(
'HUB_URL'
)
{
'https://pubsubhubbub.superfeedr.com'
}
config
.
x
.
use_https
=
https
config
.
x
.
use_s3
=
ENV
[
'S3_ENABLED'
]
==
'true'
config
.
action_mailer
.
default_url_options
=
{
host:
config
.
x
.
local_domain
,
protocol:
config
.
x
.
use_
https
?
'https://'
:
'http://'
,
trailing_slash:
false
}
config
.
action_mailer
.
default_url_options
=
{
host:
host
,
protocol:
https
?
'https://'
:
'http://'
,
trailing_slash:
false
}
if
Rails
.
env
.
production?
config
.
action_cable
.
allowed_request_origins
=
[
"http
#{
config
.
x
.
use_
https
?
's'
:
''
}
://
#{
config
.
x
.
local_domain
}
"
]
config
.
action_cable
.
allowed_request_origins
=
[
"http
#{
https
?
's'
:
''
}
://
#{
host
}
"
]
end
end
ApplicationController
.
renderer
.
defaults
.
merge!
(
http_host:
host
,
https:
https
)
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