FIX: properly support HTTPS CDN on HTTP site

Previously we changed all CDN links to schemaless.

This is desirable for non HTTPS sites, to ease migration to HTTPS.
It is not desirable for secure sites.

Once site is secure or CDN is secure a rebake should be required
to move it back to non-secure.
This commit is contained in:
Sam
2015-07-24 14:08:32 +10:00
parent b22c890e4b
commit 7a5a195dc0
3 changed files with 12 additions and 4 deletions

View File

@ -56,9 +56,9 @@ describe UrlHelper do
describe "#schemaless" do
it "removes http or https schemas only" do
it "removes http schemas only" do
expect(UrlHelper.schemaless("http://www.discourse.org")).to eq("//www.discourse.org")
expect(UrlHelper.schemaless("https://secure.discourse.org")).to eq("//secure.discourse.org")
expect(UrlHelper.schemaless("https://secure.discourse.org")).to eq("https://secure.discourse.org")
expect(UrlHelper.schemaless("ftp://ftp.discourse.org")).to eq("ftp://ftp.discourse.org")
end