-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappsettings.json
More file actions
84 lines (81 loc) · 2.58 KB
/
Copy pathappsettings.json
File metadata and controls
84 lines (81 loc) · 2.58 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
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "Data Source=(local);Initial Catalog=E-CommerceSystem;Integrated Security=True;TrustServerCertificate=True"
},
"JwtSettings": {
"SecretKey": "MySecretKey@2025MySecretKey@2025MySecretKey@2025", // Replace with a secure key
"ExpiryInMinutes": 15, // Shorter expiry for access tokens
"RefreshTokenExpiryDays": 7 // The number of days after which a refresh token will expire.
// In this case, refresh tokens will be valid for 7 days.
},
"SmtpSettings": {
"FromEmail": "example@gmail.com",
"Password": "exaple",
"Host": "smtp.gmail.com",
"Port": 587,
"EnableSsl": true
},
"Jwt": {
"Key": "DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025DotNet2025",
"Issuer": "ECommerceSystem",
"Audience": "ECommerceSystemUsers",
"ExpiryInMinutes": 15,
"RoleClaimType": "role",
"NameClaimType": "name"
},
//File Upload Limits
"FileUpload": {
"MaxFileSize": 5242880, // 5MB in bytes
"AllowedExtensions": [ ".jpg", ".jpeg", ".png", ".gif", ".bmp" ]
},
// Serilog Configuration
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.MSSqlServer" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "logs/log-.txt",
"rollingInterval": "Day",
"retainedFileCountLimit": 7,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "MSSqlServer",
"Args": {
"connectionString": "Data Source=(local);Initial Catalog=E-CommerceSystem;Integrated Security=True;TrustServerCertificate=True",
"tableName": "Logs",
"autoCreateSqlTable": true,
"restrictedToMinimumLevel": "Warning"
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ],
"Properties": {
"Application": "E-CommerceSystem"
}
},
"AllowedHosts": "*"
}