This repository was archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Cors
Gustavo Denis edited this page Oct 31, 2019
·
1 revision
| Main > Using Liquid for building your application > Set up configuration per environment > Cors |
|---|
| Cross Origin Resource Sharing (CORS) is a W3C standard that allows a server to relax the same-origin policy. Using CORS, a server can explicitly allow some cross-origin requests while rejecting others. CORS is safer and more flexible than earlier techniques such as JSONP. |
Configure the Cross-origin resource sharing to use:
##On the back-end:
"Cors": {
"Origins": "*",
"Methods": "*",
"Headers": "*"
},
Or
"Cors": {
"Origins": "http://example.com,http://www.contoso.com",
"Methods": "GET,POST,HEAD",
"Headers": "accept,content-type,origin,x-custom-header"
},
Where:
- [Cors.Origins]: The domains enabled to used by the microservice.
- [Cors.Methods]: The methods enabled to used by domain external of the microservice.
- [Cors.Headers]: The conteainers headers enabled to used by the microservice.