-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappsettings.json
More file actions
95 lines (91 loc) · 2.3 KB
/
Copy pathappsettings.json
File metadata and controls
95 lines (91 loc) · 2.3 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"AspNetCoreRateLimit": "Information"
}
},
"AllowedHosts": "*",
"Redis": {
"Configuration": "127.0.0.1:6379",
"InstanceName": "WebApplicationFirewall_"
},
"ConnectionStrings": {
"MyAppDbConnection": "Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=P@$$w0rd;"
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": false, //if true then apply limit to separate crud operations (each crud operation count is different from the other)
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
//"IpWhitelist": [ "127.0.0.1", "::1/10", "192.168.0.0/24" ],
//"EndpointWhitelist": [ "get:/api/Security/TestRateLimit", "*:/api/status" ]
"GeneralRules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 2
},
{
"Endpoint": "*",
"Period": "1m",
"Limit": 10
},
{
"Endpoint": "*",
"Period": "12h",
"Limit": 1000
},
{
"Endpoint": "*",
"Period": "7d",
"Limit": 10000
}
],
"IpPolicyPrefix": "policyIpRules"
,
"QuotaExceededResponse": {
"Content": "{{ \"message\": \"HTTP Flood detected!\", \"details\": \"Quota exceeded. Maximum allowed: {0} per {1}. Please try again in {2} second(s).\" }}",
"ContentType": "application/json",
"StatusCode": 429
}
},
"IpRateLimitPolicies": {
"IpRules": [
{
"Ip": "127.0.0.1",
"Rules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 2
}
]
},
{
"Ip": "::1",
"Rules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 2
}
]
}
]
},
"JwtSettings": {
"TokenExpiryHours": "24",
"Issuer": "Identity",
"Audience": "WebFirewall",
"SecretKey": "P/qVjn2qCz9yZqOebHMZyb0AS0WDTSKl1gV76NCVUcHxOrm+m93Zfen5i0Apx4XGhOPflfXxd7USrkF0zPOm5g==",
"Username": "admin",
"Password": "notasecret"
},
"FileUploadSettings": {
"AllowedExtensions": ".txt, .xls, .xlsx",
"UploadDirectory": "uploads"
}
}