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.
pull/2780/head
Fabricio Leonardo Sodano Pascazi 2023-02-27 16:17:39 +11:00 committed by GitHub
parent d2efb18ef1
commit 7cde2bcba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ function report_mail(rid, cid) {
}).then(function (result) { }).then(function (result) {
if (result.value){ if (result.value){
api.campaignId.get(cid).success((function(c) { 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.pathname = '/report'
report_url.search = "?rid=" + rid report_url.search = "?rid=" + rid
$.ajax({ $.ajax({