From 7cde2bcba1fc5b9c68f2a2d7eeb82482599d905b Mon Sep 17 00:00:00 2001 From: Fabricio Leonardo Sodano Pascazi Date: Mon, 27 Feb 2023 16:17:39 +1100 Subject: [PATCH] Use location instead of campaign listener URL The campaign listener URL can be anything (for instance an URL shortener), but when performing an admin function, it should refer to the admin URL itself. --- static/js/src/app/campaign_results.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/src/app/campaign_results.js b/static/js/src/app/campaign_results.js index a16bb13c..f51dfca7 100644 --- a/static/js/src/app/campaign_results.js +++ b/static/js/src/app/campaign_results.js @@ -933,7 +933,7 @@ function report_mail(rid, cid) { }).then(function (result) { if (result.value){ api.campaignId.get(cid).success((function(c) { - report_url = new URL(c.url) + report_url = new URL(`${location.protocol}//${location.host}`) report_url.pathname = '/report' report_url.search = "?rid=" + rid $.ajax({