Skip to content

Commit 4772efb

Browse files
committed
update configurations.md
1 parent c9dd802 commit 4772efb

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

content/en/dotnet-webapi-boilerplate/fundamentals/configurations.md

+37
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,40 @@ Within the Host boot project there is a folder called "Configurations". where th
3939
> The classic appsettings.json configuration file is still available to manage custom parameters.
4040
4141
The **`Startup` class** inside the folder is responsible for loading all the configuration files described above.
42+
43+
## Cache
44+
45+
By default, the application uses in-memory cache. To enable Distributed caching with Redis, set the `UseDistributedCache` and `PreferRedis` to true and give a valid redis url!
46+
47+
```json
48+
{
49+
"CacheSettings": {
50+
"UseDistributedCache": false,
51+
"PreferRedis": false,
52+
"RedisURL": "localhost:6379"
53+
}
54+
}
55+
```
56+
## CORS
57+
58+
Depends on the client consuming the WebAPI.
59+
60+
```json
61+
{
62+
"CorsSettings": {
63+
"Angular": "http://localhost:4200",
64+
"Blazor": "https://localhost:5002;https://www.mydomain.my",
65+
"React": "http://localhost:3000"
66+
}
67+
}
68+
```
69+
## Database
70+
71+
```json
72+
{
73+
"DatabaseSettings": {
74+
"DBProvider": "postgresql",
75+
"ConnectionString": "Host=localhost;Port=5432;Database=fshDb;Username=postgres;Password=admin;Include Error Detail=true"
76+
}
77+
}
78+
```

0 commit comments

Comments
 (0)