Skip to content

Commit 09eefc1

Browse files
committed
Add CORS configuration documentation for layered web application solution template
1 parent 834d81f commit 09eefc1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Layered Solution: CORS Configuration
2+
3+
```json
4+
//[doc-nav]
5+
{
6+
"Previous": {
7+
"Name": "BLOB Storing",
8+
"Path": "solution-templates/layered-web-application/blob-storing"
9+
},
10+
"Next": {
11+
"Name": "Helm Charts and Kubernetes",
12+
"Path": "solution-templates/layered-web-application/helm-charts-and-kubernetes"
13+
}
14+
}
15+
```
16+
17+
Cross-Origin Resource Sharing (CORS) is a security feature that allows web applications to make requests to a different domain than the one that served the web page.
18+
19+
In the layered solution template, CORS configuration is applied in the following cases:
20+
- If you select the [Tiered solution](solution-structure.md#tiered-structure-).
21+
- If you choose [Angular](web-applications.md#angular) as the web application type.
22+
- If you choose [No UI](web-applications.md#no-ui) as the web application type.
23+
24+
The CORS settings are configured in the `appsettings.json` file of the corresponding project. Typically, the web application serves as the entry point for front-end applications, so it must be configured to accept requests from different origins.
25+
26+
The default configuration in `appsettings.json` is as follows:
27+
28+
```json
29+
{
30+
"App": {
31+
"CorsOrigins": "https://*.MyProjectName.com"
32+
}
33+
}
34+
```
35+
36+
You can modify the `CorsOrigins` property to include additional domains or wildcard subdomains as required by your application.

0 commit comments

Comments
 (0)