Skip to content

Commit 61c971e

Browse files
committed
Update wss
1 parent 2f1ff4c commit 61c971e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://*.cartocdn.com https://*.openstreetmap.org data:; object-src 'none'; connect-src 'self' wss:">
7+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' https://*.cartocdn.com https://*.openstreetmap.org data:; object-src 'none'; connect-src 'self' wss: ws:">
88
<title>T-Pot Attack Map - Real-time Cybersecurity Visualization</title>
99
<meta name="description" content="Real-time visualization of T-Pot honeypot attacks and cybersecurity threats">
1010

@@ -550,7 +550,7 @@ <h4 class="flex-center"><i class="fas fa-database"></i> Data Management</h4>
550550
</div>
551551

552552
<script src="static/cache-bridge.js" defer integrity="sha384-mMltIbf7JoxVuM6ZaB7TYkrLmY2njkbSTL9VvYqNKtmct/C2X1/JvKr8FeYHU0I+"></script>
553-
<script src="static/map.js" defer integrity="sha384-XUfrARkfvI+TUthPPVS1Sp74Q3zGSAbhmMmAdq3oMVonxw5lVsM4MGnlEGAk8bTK"></script>
553+
<script src="static/map.js" defer integrity="sha384-2qT3tHtMdXU7HVX5lsXUrVs/of8RMbZKLzlajAkUSFHOQtHBOR/e8klblY+r89DE"></script>
554554
<script src="static/dashboard.js" defer integrity="sha384-G3w6UiVOgfx+CP0Otu961qJu1kfOfCLHDO4rtaWMPxem4VHwdL1SPSA0jDDWqRKF"></script>
555555
</body>
556556

static/map.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,8 @@ function connectWebSocket() {
12881288
}
12891289

12901290
isReconnecting = true;
1291-
const WS_HOST = 'ws://'+window.location.host+'/websocket'
1291+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
1292+
const WS_HOST = protocol + '//' + window.location.host + '/websocket';
12921293

12931294
// Update status to connecting when attempting connection
12941295
if (window.attackMapDashboard) {

0 commit comments

Comments
 (0)