-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json
More file actions
78 lines (78 loc) · 1.52 KB
/
Copy pathconfig.json
File metadata and controls
78 lines (78 loc) · 1.52 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
{
"port": 8080,
"staticDir": "./static",
"security": {
"basicAuth": {
"username": "admin",
"password": "secure123"
},
"ipWhitelist": ["127.0.0.1", "192.168.1.0/24"],
"cors": {
"origins": ["*"],
"methods": ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
"headers": ["Content-Type", "Authorization"]
}
},
"loadBalancer": {
"algorithm": "round-robin",
"healthCheck": {
"enabled": true,
"interval": 30000,
"timeout": 5000,
"path": "/health"
}
},
"logging": {
"accessLog": true,
"errorLog": true,
"format": "combined"
},
"compression": true,
"cache": {
"enabled": true,
"maxAge": 300000
},
"rateLimit": {
"enabled": true,
"windowMs": 60000,
"max": 100
},
"timeout": 30000,
"retries": 2,
"routes": [
{
"path": "/api/products",
"targets": [
{"url": "http://product-service:3001", "weight": 2},
{"url": "http://another-product-service:3001", "weight": 1}
],
"cors": true,
"cache": true
},
{
"host": "api.localhost",
"targets": [
{"url": "http://api-backend:4000"}
],
"cors": true,
"auth": true
},
{
"path": "/api/health",
"targets": [
{"url": "http://product-service:3001"}
]
},
{
"path": "/docs",
"staticFile": "docs.html",
"cache": true
},
{
"path": "/ws",
"targets": [
{"url": "http://websocket-service:6000"}
]
}
]
}