Skip to content

Commit b7fede5

Browse files
committed
Portal B20 + config ref: correct PORTAL_CORS_ALLOWED_ORIGINS default
OEL confirmed: rs/cors v1.11.1 treats an empty AllowedOrigins slice as allow-all (sets allowedOriginsAll=true). When PORTAL_CORS_ALLOWED_ORIGINS is unset the Portal allows all origins — not "no origins" as previously stated. Update both B20 and configuration.mdx to reflect actual behavior.
1 parent 510f292 commit b7fede5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

portal/how-to-guides/configure-cors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Portal application CORS controls which external origins may call the Portal's ow
4848

4949
Set [PORTAL_CORS_ALLOWED_ORIGINS](/product-stack/tyk-enterprise-developer-portal/deploy/configuration#portal-cors-allowed-origins) to the origins permitted to make cross-origin requests to the Portal. Use the exact scheme and host of each origin, separated by commas. Wildcards are supported.
5050

51-
{/* TODO: Verify the default behavior when PORTAL_CORS_ALLOWED_ORIGINS is unset. Code analysis (rs/cors library) indicates an empty slice allows all origins. The configuration reference states no origins are allowed by default. Confirm with the Portal team before documenting a specific default. */}
51+
When unset, all origins are allowed by default. Specify origins explicitly to restrict access.
5252

5353
<Tabs>
5454
<Tab title="Environment variable">

product-stack/tyk-enterprise-developer-portal/deploy/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ In other words, any cross-origin request will be denied. When enabled, the below
522522
**Config file:** CORS.AllowedOrigins <br/>
523523
**Type:** `[string]` <br/>
524524
**Description**: A list of origin domains to allow access from. Wildcards are also supported, e.g. [`*.foo.com`] will allow access from any domain that ends with *.foo.com*.
525-
By default, no origins are allowed. To apply this setting, an array of the allowed origins.
525+
When unset, all origins are allowed by default. Specify origins explicitly to restrict access.
526526

527527
To configure using a configuration file:
528528
```json

0 commit comments

Comments
 (0)