mirror of
https://github.com/casjaysdevdocker/bind
synced 2024-11-22 23:23:09 -05:00
ddfe8bf8a7
All checks were successful
release-tag / release-image (push) Successful in 3m18s
rootfs/usr/share/httpd/default/js/errorpages/homepage.js
17 lines
430 B
JavaScript
17 lines
430 B
JavaScript
function homepage(getURI) {
|
|
let baseURI = getURI;
|
|
let port = location.port;
|
|
let url = location.hostname;
|
|
let proto = location.protocol;
|
|
let baseURL = baseURI || location.pathname;
|
|
let base = baseURL.slice(0, baseURL.lastIndexOf('/'));
|
|
if (!base) base = '/';
|
|
if (!port)
|
|
if (proto == 'https:') {
|
|
port = 443;
|
|
} else {
|
|
port = 80;
|
|
}
|
|
window.location = proto + '//' + url + ':' + port + base;
|
|
}
|