LMS.service/LMS.service/appsettings.json

59 lines
1.3 KiB
JSON
Raw Normal View History

2024-10-13 17:04:47 +08:00
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "File",
"Args": {
"path": "logs/app-.log",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
"retainedFileCountLimit": 31
}
}
],
"Enrich": [ "FromLogContext" ]
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"IpWhitelist": [],
"EndpointWhitelist": [ "get:/api/status", "*:/api/health" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"GeneralRules": [
{
"Endpoint": "get:/lms/User/GetPublicKey",
"Period": "1m",
"Limit": 5
},
{
"Endpoint": "post:/lms/User/Login*",
"Period": "1m",
"Limit": 5
},
{
"Endpoint": "post:/lms/User/Register",
"Period": "1m",
"Limit": 10
}
]
},
"Version": "1.0.8",
2024-10-13 17:04:47 +08:00
"AllowedHosts": "*"
}