+4
-9
flags.json
+4
-9
flags.json
···
3
3
"map.dunkirk.sh": {
4
4
"name": "Map",
5
5
"flags": {
6
-
"block-map-sse": {
7
-
"name": "Block SSE Endpoint",
8
-
"description": "Disable /sse Server-Sent Events",
9
-
"path": "/sse"
10
-
},
11
-
"block-map-players": {
12
-
"name": "Block Player Markers",
13
-
"description": "Disable player location tracking",
14
-
"path": "/tiles/world/markers/pl3xmap_players.json"
6
+
"block-tracking": {
7
+
"name": "Block Player Tracking",
8
+
"description": "Disable real-time player location updates",
9
+
"paths": ["/sse", "/tiles/world/markers/pl3xmap_players.json"]
15
10
}
16
11
}
17
12
}
public/control.jpg
public/control.jpg
This is a binary file and will not be displayed.
+19
-14
public/index.html
+19
-14
public/index.html
···
1
-
<!DOCTYPE html>
1
+
<!doctype html>
2
2
<html lang="en">
3
-
<head>
4
-
<meta charset="UTF-8">
5
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6
-
<title>Control Panel</title>
7
-
<link rel="preconnect" href="https://fonts.googleapis.com">
8
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
-
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500&display=swap" rel="stylesheet">
10
-
<link rel="stylesheet" href="./styles.css">
11
-
</head>
12
-
<body>
13
-
<div id="app"></div>
14
-
<script type="module" src="./client.ts"></script>
15
-
</body>
3
+
<head>
4
+
<meta charset="UTF-8" />
5
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+
<title>Control Panel</title>
7
+
<link rel="icon" type="image/jpeg" href="control.jpg" />
8
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
9
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
+
<link
11
+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500&display=swap"
12
+
rel="stylesheet"
13
+
/>
14
+
<link rel="stylesheet" href="./styles.css" />
15
+
</head>
16
+
17
+
<body>
18
+
<div id="app"></div>
19
+
<script type="module" src="./client.ts"></script>
20
+
</body>
16
21
</html>
+6
-5
src/flags.ts
+6
-5
src/flags.ts
···
34
34
export interface FlagDefinition {
35
35
name: string;
36
36
description: string;
37
-
path?: string; // The path this flag blocks (e.g., "/sse")
37
+
paths: string[]; // The paths this flag blocks
38
38
}
39
39
40
40
export interface ServiceDefinition {
···
136
136
continue;
137
137
}
138
138
139
-
// Check if the flag applies to this path
140
-
const flagPath = flag.path || `/${flagId.split("-").pop()}`;
141
-
if (path === flagPath || path.startsWith(flagPath + "/") || path.startsWith(flagPath + "?")) {
142
-
return true;
139
+
// Check if any of the flag's paths match
140
+
for (const flagPath of flag.paths) {
141
+
if (path === flagPath || path.startsWith(flagPath + "/") || path.startsWith(flagPath + "?")) {
142
+
return true;
143
+
}
143
144
}
144
145
}
145
146
}
+2
-1
src/index.ts
+2
-1
src/index.ts
···
33
33
return c.json({
34
34
client_id: CLIENT_ID,
35
35
client_name: "Control Panel",
36
-
logo_uri: "https://hc-cdn.hel1.your-objectstorage.com/s/v3/d19f900e04238dcd_control.png",
36
+
logo_uri:
37
+
"https://hc-cdn.hel1.your-objectstorage.com/s/v3/d19f900e04238dcd_control.png",
37
38
redirect_uris: [REDIRECT_URI],
38
39
});
39
40
});