[MediaWiki-commits] [Gerrit] Fixed api origin parameter - change (mediawiki...Graph)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed api origin parameter .. Fixed api origin parameter Bug: T126993 Change-Id: I262b47744730cb712a04792df5cbcf592745632e --- M lib/graph2.compiled.js M modules/graph2.js 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js index b982d3b..83f46b2 100644 --- a/lib/graph2.compiled.js +++ b/lib/graph2.compiled.js @@ -43,12 +43,12 @@ // This is broader than the same-origin policy, // but playing on the safer side. opt.headers = { 'Treat-as-Untrusted': 1 }; - } else if ( opt.isApiCall ) { - // All CORS api calls require origin parameter. - // It would be better to use location.origin, - // but apparently it's not universal yet. - uri.query.origin = location.protocol + '//' + location.host; } + } else if ( opt.isApiCall ) { + // All CORS api calls require origin parameter. + // It would be better to use location.origin, + // but apparently it's not universal yet. + uri.query.origin = location.protocol + '//' + location.host; } return uri.toString(); diff --git a/modules/graph2.js b/modules/graph2.js index 58954f6..23dd211 100644 --- a/modules/graph2.js +++ b/modules/graph2.js @@ -42,12 +42,12 @@ // This is broader than the same-origin policy, // but playing on the safer side. opt.headers = { 'Treat-as-Untrusted': 1 }; - } else if ( opt.isApiCall ) { - // All CORS api calls require origin parameter. - // It would be better to use location.origin, - // but apparently it's not universal yet. - uri.query.origin = location.protocol + '//' + location.host; } + } else if ( opt.isApiCall ) { + // All CORS api calls require origin parameter. + // It would be better to use location.origin, + // but apparently it's not universal yet. + uri.query.origin = location.protocol + '//' + location.host; } return uri.toString(); -- To view, visit https://gerrit.wikimedia.org/r/270782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I262b47744730cb712a04792df5cbcf592745632e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Graph Gerrit-Branch: master Gerrit-Owner: YurikGerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed api origin parameter - change (mediawiki...Graph)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/270782 Change subject: Fixed api origin parameter .. Fixed api origin parameter Bug: T126993 Change-Id: I262b47744730cb712a04792df5cbcf592745632e --- M lib/graph2.compiled.js M modules/graph2.js 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph refs/changes/82/270782/1 diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js index b982d3b..83f46b2 100644 --- a/lib/graph2.compiled.js +++ b/lib/graph2.compiled.js @@ -43,12 +43,12 @@ // This is broader than the same-origin policy, // but playing on the safer side. opt.headers = { 'Treat-as-Untrusted': 1 }; - } else if ( opt.isApiCall ) { - // All CORS api calls require origin parameter. - // It would be better to use location.origin, - // but apparently it's not universal yet. - uri.query.origin = location.protocol + '//' + location.host; } + } else if ( opt.isApiCall ) { + // All CORS api calls require origin parameter. + // It would be better to use location.origin, + // but apparently it's not universal yet. + uri.query.origin = location.protocol + '//' + location.host; } return uri.toString(); diff --git a/modules/graph2.js b/modules/graph2.js index 58954f6..23dd211 100644 --- a/modules/graph2.js +++ b/modules/graph2.js @@ -42,12 +42,12 @@ // This is broader than the same-origin policy, // but playing on the safer side. opt.headers = { 'Treat-as-Untrusted': 1 }; - } else if ( opt.isApiCall ) { - // All CORS api calls require origin parameter. - // It would be better to use location.origin, - // but apparently it's not universal yet. - uri.query.origin = location.protocol + '//' + location.host; } + } else if ( opt.isApiCall ) { + // All CORS api calls require origin parameter. + // It would be better to use location.origin, + // but apparently it's not universal yet. + uri.query.origin = location.protocol + '//' + location.host; } return uri.toString(); -- To view, visit https://gerrit.wikimedia.org/r/270782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I262b47744730cb712a04792df5cbcf592745632e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Graph Gerrit-Branch: master Gerrit-Owner: Yurik___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits