-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.json
More file actions
78 lines (78 loc) · 1.94 KB
/
Copy pathconfig.example.json
File metadata and controls
78 lines (78 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"enabled": true,
"port": 8080,
"bindAddress": "0.0.0.0",
"tls": {
"enabled": false,
"certPath": "cert.pem",
"keyPath": "key.pem",
"keyPassword": null
},
"jwt": {
"issuer": "hytale-api",
"audience": "hytale-server",
"tokenValiditySeconds": 3600,
"refreshTokenValiditySeconds": 86400,
"rsaKeyPath": "jwt-keypair.pem",
"algorithm": "RS256"
},
"clients": [
{
"id": "admin",
"secret": "$2a$12$YOUR_BCRYPT_HASH_HERE",
"description": "Admin client - CHANGE SECRET BEFORE USE",
"permissions": ["api.*"],
"enabled": true
},
{
"id": "monitor",
"secret": "$2a$12$YOUR_BCRYPT_HASH_HERE",
"description": "Read-only monitoring client",
"permissions": [
"api.status.read",
"api.players.read",
"api.worlds.read",
"api.websocket.connect",
"api.websocket.subscribe.status"
],
"enabled": true
}
],
"rateLimits": {
"defaultRequestsPerMinute": 60,
"burstSize": 10,
"endpoints": {
"/auth/token": {
"requestsPerMinute": 10,
"burstSize": 3
},
"/admin/*": {
"requestsPerMinute": 30,
"burstSize": 5
}
}
},
"cors": {
"allowedOrigins": ["*"],
"allowedMethods": ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
"allowedHeaders": ["Authorization", "Content-Type", "X-Request-ID"],
"exposedHeaders": ["X-Request-ID", "X-RateLimit-Remaining"],
"allowCredentials": true,
"maxAge": 86400
},
"websocket": {
"enabled": true,
"path": "/ws",
"maxConnections": 100,
"pingIntervalSeconds": 30,
"statusBroadcastIntervalSeconds": 5,
"_statusBroadcastIntervalSeconds_comment": "Set to 1 for real-time updates, 0 to disable"
},
"audit": {
"enabled": true,
"logRequests": true,
"logResponses": false,
"logAdminActions": true,
"sensitiveFields": ["secret", "password", "token", "authorization"]
}
}