mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-05-10 18:31:56 +00:00
tweaking
This commit is contained in:
parent
ff7c368c7f
commit
a08a475f57
6 changed files with 16 additions and 7 deletions
docker/nginx/dist
2
docker/nginx/dist/conf/tpotweb.conf
vendored
2
docker/nginx/dist/conf/tpotweb.conf
vendored
|
@ -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';
|
||||
|
||||
|
||||
##############################################
|
||||
|
|
BIN
docker/nginx/dist/html/assets/icons/favicon.png
vendored
BIN
docker/nginx/dist/html/assets/icons/favicon.png
vendored
Binary file not shown.
Before ![]() (image error) Size: 27 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
4
docker/nginx/dist/html/assets/js/lists.js
vendored
4
docker/nginx/dist/html/assets/js/lists.js
vendored
|
@ -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
13
docker/nginx/dist/html/cockpit.html
vendored
Normal 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>
|
||||
|
4
docker/nginx/dist/html/config.js
vendored
4
docker/nginx/dist/html/config.js
vendored
|
@ -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',
|
||||
|
|
BIN
docker/nginx/dist/html/favicon.ico
vendored
BIN
docker/nginx/dist/html/favicon.ico
vendored
Binary file not shown.
Before Width: 116px | Height: 126px | Size: 16 KiB |
Loading…
Reference in a new issue