mirror of
https://github.com/pi-hole/web.git
synced 2026-04-26 03:40:09 +01:00
Build HTTPS URL using Javascript to ensure we use the exact same URL the user used to get there - do not hard-code pi.hole as hostname
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -117,4 +117,10 @@ $(function () {
|
||||
|
||||
// Clear TOTP field
|
||||
$("#totp").val("");
|
||||
|
||||
// Generate HTTPS redirection link (only used if not already HTTPS)
|
||||
if (location.protocol !== "https:") {
|
||||
const url = "https:" + location.href.substring(location.protocol.length);
|
||||
$("#https-link").attr("href", url);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user