Use protocol-relative URLs

pull/210/merge
Thibaut 10 years ago
parent 61d1d49f64
commit 5568630fc2

@ -59,7 +59,7 @@ app.templates.intro = """
<li>DevDocs works <a href="/offline">offline</a>, on mobile, and can be installed on <a href="https://chrome.google.com/webstore/detail/devdocs/mnfehgbmkapmjnhcnbodoamcioleeooe">Chrome</a> and <a href="https://marketplace.firefox.com/app/devdocs/">Firefox</a>. <li>DevDocs works <a href="/offline">offline</a>, on mobile, and can be installed on <a href="https://chrome.google.com/webstore/detail/devdocs/mnfehgbmkapmjnhcnbodoamcioleeooe">Chrome</a> and <a href="https://marketplace.firefox.com/app/devdocs/">Firefox</a>.
<li>For the latest news, subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a> or follow <a href="https://twitter.com/DevDocs">@DevDocs</a> <li>For the latest news, subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a> or follow <a href="https://twitter.com/DevDocs">@DevDocs</a>
<li>DevDocs is free and <a href="https://github.com/Thibaut/devdocs">open source</a> <li>DevDocs is free and <a href="https://github.com/Thibaut/devdocs">open source</a>
<iframe class="_github-btn" src="http://ghbtns.com/github-btn.html?user=Thibaut&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe> <iframe class="_github-btn" src="//ghbtns.com/github-btn.html?user=Thibaut&repo=devdocs&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
<li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/Thibaut/">Gratipay</a>. Thanks! <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/Thibaut/">Gratipay</a>. Thanks!
</ol> </ol>
<p class="_intro-sponsors"> <p class="_intro-sponsors">

@ -38,6 +38,7 @@ class App < Sinatra::Application
config.environment = sprockets config.environment = sprockets
config.prefix = "/#{assets_prefix}" config.prefix = "/#{assets_prefix}"
config.public_path = public_folder config.public_path = public_folder
config.protocol = :relative
end end
end end
@ -57,7 +58,7 @@ class App < Sinatra::Application
configure :production do configure :production do
set :static, false set :static, false
set :docs_host, 'http://docs.devdocs.io' set :docs_host, '//docs.devdocs.io'
use Rack::ConditionalGet use Rack::ConditionalGet
use Rack::ETag use Rack::ETag
@ -180,7 +181,7 @@ class App < Sinatra::Application
end end
get '/s/shopify' do get '/s/shopify' do
redirect 'http://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs' redirect 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'
end end
get %r{\A/feed(?:\.atom)?\z} do get %r{\A/feed(?:\.atom)?\z} do

Loading…
Cancel
Save