Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #204 from Wikia/PLATFORM-3184
Browse files Browse the repository at this point in the history
PLATFORM-3184: use current protocol in urls
  • Loading branch information
ludwikkazmierczak authored Oct 30, 2017
2 parents b537114 + 898b058 commit ec65399
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export function buildUrl(urlParams = {}) {
const host = urlParams.host;

if (!urlParams.protocol) {
urlParams.protocol = 'http';
if (window && window.location && window.location.protocol) {
urlParams.protocol = window.location.protocol.replace(':', '');
} else {
urlParams.protocol = 'http';
}
}

if (!urlParams.articlePath) {
Expand Down

0 comments on commit ec65399

Please sign in to comment.