Merge pull request #9879 from jchenevey/patch-1

DOC Update 02_cors.md
This commit is contained in:
Steve Boyd 2021-03-19 12:29:14 +13:00 committed by GitHub
commit 358efdb51d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ Once you have enabled CORS you can then control four new headers in the HTTP Res
Allow requests from one specific external domain.
```yaml
Allow-Origin: 'my.domain.com'
Allow-Origin: 'https://my.domain.com'
```
* **Multiple Domains**:
@ -60,8 +60,8 @@ Once you have enabled CORS you can then control four new headers in the HTTP Res
```yaml
Allow-Origin:
- 'my.domain.com'
- 'your.domain.org'
- 'https://my.domain.com'
- 'https://your.domain.org'
```
2. **Access-Control-Allow-Headers.**
@ -131,7 +131,7 @@ If you add extra headers to your GraphQL server, you will need to write a
SilverStripe\GraphQL\Controller:
cors:
Enabled: true
Allow-Origin: 'silverstripe.org'
Allow-Origin: 'https://silverstripe.org'
Allow-Headers: 'Authorization, Content-Type'
Allow-Methods: 'GET, POST, OPTIONS'
Allow-Credentials: 'true'