mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-04 17:59:56 +01:00
Don't fall back to relative address when using proxy-https
Affects issues: - Fixed #3032
This commit is contained in:
parent
9bf7d65137
commit
bd5dcb7512
@ -6,8 +6,14 @@ const javaReplaced = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isCurrentAddress = (address) => {
|
const isCurrentAddress = (address) => {
|
||||||
const is = window.location.href.startsWith(address);
|
let is = window.location.href.startsWith(address);
|
||||||
if (!is) console.warn(`Configured address ${address} did not match start of ${window.location.href}, falling back to relative address. Configure 'Webserver.Alternative_IP' settings to point to your address.`)
|
const usingProxyHttps = window.location.href.startsWith("https") && address.startsWith("http");
|
||||||
|
if (usingProxyHttps) {
|
||||||
|
is = window.location.href.replace('https', '').startsWith(address.replace('http'));
|
||||||
|
}
|
||||||
|
if (!is) {
|
||||||
|
console.warn(`Configured address ${address} did not match start of ${window.location.href}, falling back to relative address. Configure 'Webserver.Alternative_IP' settings to point to your address.`)
|
||||||
|
}
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user