History

Use protocol-relative URLs

Thibaut committed 11 years ago

Commit 55686301 parent 61d1d492 files · +4 −3Browse files

Unified · Split

2 files
  1. assets/javascripts/templates/pages/root_tmpl.coffee.erb +1 −1
  2. lib/app.rb +3 −2
assets/javascripts/templates/pages/root_tmpl.coffee.erb+1−1
@@ -59,7 +59,7 @@ app.templates.intro = """ · 58 unmodified lines
59 <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>.59 <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>.
60 <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>60 <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>
61 <li>DevDocs is free and <a href="https://github.com/Thibaut/devdocs">open source</a>61 <li>DevDocs is free and <a href="https://github.com/Thibaut/devdocs">open source</a>
62 <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>62 <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>
63 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/Thibaut/">Gratipay</a>. Thanks!63 <li>If you like the app, please consider supporting the project on <a href="https://gratipay.com/Thibaut/">Gratipay</a>. Thanks!
64 </ol>64 </ol>
65 <p class="_intro-sponsors">65 <p class="_intro-sponsors">
lib/app.rb+3−2
@@ -38,6 +38,7 @@ class App < Sinatra::Application · 37 unmodified lines
38 config.environment = sprockets38 config.environment = sprockets
39 config.prefix = "/#{assets_prefix}"39 config.prefix = "/#{assets_prefix}"
40 config.public_path = public_folder40 config.public_path = public_folder
41 config.protocol = :relative
41 end42 end
42 end43 end
43 44
@@ -57,7 +58,7 @@ class App < Sinatra::Application · 13 unmodified lines
57 58
58 configure :production do59 configure :production do
59 set :static, false60 set :static, false
60 set :docs_host, 'http://docs.devdocs.io'61 set :docs_host, '//docs.devdocs.io'
61 62
62 use Rack::ConditionalGet63 use Rack::ConditionalGet
63 use Rack::ETag64 use Rack::ETag
@@ -180,7 +181,7 @@ class App < Sinatra::Application · 116 unmodified lines
180 end181 end
181 182
182 get '/s/shopify' do183 get '/s/shopify' do
183 redirect 'http://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'184 redirect 'https://www.shopify.com/careers?utm_source=devdocs&utm_medium=banner&utm_campaign=devdocs'
184 end185 end
185 186
186 get %r{\A/feed(?:\.atom)?\z} do187 get %r{\A/feed(?:\.atom)?\z} do