Skip to content

Commit d01799c

Browse files
authored
Merge pull request #180191 from simonaco/patch-1
update configuration with CORS example
2 parents cc15b35 + 5ec2c82 commit d01799c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

articles/static-web-apps/configuration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ Some common use cases for global headers include:
208208
- Custom caching rules
209209
- Enforcing security policies
210210
- Encoding settings
211+
- Configuring cross-origin resource sharing ([CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS))
212+
213+
The following is an example of how to implement a custom CORS configuration.
214+
215+
```json
216+
{
217+
"globalHeaders": {
218+
"Access-Control-Allow-Origin": "https://example.com",
219+
"Access-Control-Allow-Methods": "POST, GET, OPTIONS"
220+
}
221+
}
222+
```
211223

212224
## Response overrides
213225

0 commit comments

Comments
 (0)