This commit is contained in:
t3chn0m4g3 2023-04-25 17:47:44 +00:00
parent ff7c368c7f
commit a08a475f57
6 changed files with 16 additions and 7 deletions

View file

@ -15,12 +15,10 @@ server {
root /var/lib/nginx/html;
add_header Cache-Control "public, max-age=604800";
##############################################
### Remove version number add different header
##############################################
server_tokens off;
more_set_headers 'Server: apache';
##############################################

Binary file not shown.

Before

(image error) Size: 27 KiB

After

(image error) Size: 16 KiB

View file

@ -5,7 +5,7 @@
// Print the first List
const isLinkAvailable = async (link) => {
try {
const response = await fetch(link, { method: 'HEAD', redirect: 'manual' });
const response = await fetch(link, { method: 'HEAD', mode: 'no-cors' });
if (response.ok) {
// The link is available
return true;
@ -13,7 +13,7 @@ const isLinkAvailable = async (link) => {
// The link is a redirect, follow the redirect and check the final location
const newLocation = response.headers.get('Location');
if (newLocation) {
const newResponse = await fetch(newLocation, { method: 'HEAD' });
const newResponse = await fetch(newLocation, { method: 'HEAD', mode: 'no-cors' });
if (newResponse.ok) {
// The final location is available
return true;

13
docker/nginx/dist/html/cockpit.html vendored Normal file
View file

@ -0,0 +1,13 @@
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Redirect to Cockpit</title>
</head>
<body>
<script type="text/javascript">
window.location.href = window.location.protocol + '//' + window.location.hostname + ':64294';
</script>
</body>
</html>

View file

@ -5,8 +5,6 @@
// │ │ ││││├┤ ││ ┬│ │├┬┘├─┤ │ ││ ││││
// └─┘└─┘┘└┘└ ┴└─┘└─┘┴└─┴ ┴ ┴ ┴└─┘┘└┘
// Create link for Cockpit redirection (instead of cockpit.html), so we can create links dynamically in assets/js/lists.js
const redirectCockpit = window.location.protocol + '//' + window.location.hostname + ':64294'
const CONFIG = {
// ┌┐ ┌─┐┌─┐┬┌─┐┌─┐
// ├┴┐├─┤└─┐││ └─┐
@ -40,7 +38,7 @@ const CONFIG = {
},
{
name: 'Cockpit',
link: redirectCockpit,
link: '/cockpit.html',
},
{
name: 'Cyberchef',

Binary file not shown.

Before

Width: 116px  |  Height: 126px  |  Size: 16 KiB