mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-01 05:31:38 +03:00
Fixed http port and reset with save
This commit is contained in:
parent
a2dd7c32d5
commit
2c2295c161
6 changed files with 23 additions and 7 deletions
client/src/helpers
|
@ -171,7 +171,7 @@ export const redirectCheck = (url) => {
|
|||
}, STOP_TIMEOUT);
|
||||
};
|
||||
|
||||
export const redirectToCurrentProtocol = (values) => {
|
||||
export const redirectToCurrentProtocol = (values, httpPort = 80) => {
|
||||
const {
|
||||
protocol, hostname, hash, port,
|
||||
} = window.location;
|
||||
|
@ -183,6 +183,6 @@ export const redirectToCurrentProtocol = (values) => {
|
|||
} else if (protocol === 'https:' && enabled && port_https && port_https !== port) {
|
||||
redirectCheck(`https://${hostname}${httpsPort}/${hash}`);
|
||||
} else if (protocol === 'https:' && (!enabled || !port_https)) {
|
||||
window.location.replace(`http://${hostname}/${hash}`);
|
||||
window.location.replace(`http://${hostname}:${httpPort}/${hash}`);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue