From 09eefc19083d0a493b34d33c69c5a626d79ff909 Mon Sep 17 00:00:00 2001 From: ahmetfarukulu Date: Mon, 16 Dec 2024 11:54:26 +0300 Subject: [PATCH] Add CORS configuration documentation for layered web application solution template --- .../cors-configuration.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/en/solution-templates/layered-web-application/cors-configuration.md diff --git a/docs/en/solution-templates/layered-web-application/cors-configuration.md b/docs/en/solution-templates/layered-web-application/cors-configuration.md new file mode 100644 index 0000000000..bae5f9acc6 --- /dev/null +++ b/docs/en/solution-templates/layered-web-application/cors-configuration.md @@ -0,0 +1,36 @@ +# Layered Solution: CORS Configuration + +```json +//[doc-nav] +{ + "Previous": { + "Name": "BLOB Storing", + "Path": "solution-templates/layered-web-application/blob-storing" + }, + "Next": { + "Name": "Helm Charts and Kubernetes", + "Path": "solution-templates/layered-web-application/helm-charts-and-kubernetes" + } +} +``` + +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. + +In the layered solution template, CORS configuration is applied in the following cases: +- If you select the [Tiered solution](solution-structure.md#tiered-structure-). +- If you choose [Angular](web-applications.md#angular) as the web application type. +- If you choose [No UI](web-applications.md#no-ui) as the web application type. + +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. + +The default configuration in `appsettings.json` is as follows: + +```json +{ + "App": { + "CorsOrigins": "https://*.MyProjectName.com" + } +} +``` + +You can modify the `CorsOrigins` property to include additional domains or wildcard subdomains as required by your application. \ No newline at end of file