mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
commit
358efdb51d
@ -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.
|
Allow requests from one specific external domain.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Allow-Origin: 'my.domain.com'
|
Allow-Origin: 'https://my.domain.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
* **Multiple Domains**:
|
* **Multiple Domains**:
|
||||||
@ -60,8 +60,8 @@ Once you have enabled CORS you can then control four new headers in the HTTP Res
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Allow-Origin:
|
Allow-Origin:
|
||||||
- 'my.domain.com'
|
- 'https://my.domain.com'
|
||||||
- 'your.domain.org'
|
- 'https://your.domain.org'
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Access-Control-Allow-Headers.**
|
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:
|
SilverStripe\GraphQL\Controller:
|
||||||
cors:
|
cors:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Allow-Origin: 'silverstripe.org'
|
Allow-Origin: 'https://silverstripe.org'
|
||||||
Allow-Headers: 'Authorization, Content-Type'
|
Allow-Headers: 'Authorization, Content-Type'
|
||||||
Allow-Methods: 'GET, POST, OPTIONS'
|
Allow-Methods: 'GET, POST, OPTIONS'
|
||||||
Allow-Credentials: 'true'
|
Allow-Credentials: 'true'
|
||||||
|
Loading…
Reference in New Issue
Block a user