10. CORS - nathan-fiscaletti/synful GitHub Wiki
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web application running at one origin (domain) have permission to access selected resources from a server at a different origin.⁽¹⁾
Configuring CORS with Synful
You can enable CORS in synful using the System.json configuration file.
Example
"cors_enabled":true,
Once you have enabled CORS, you can configure which domains can have access to it. If you use the value "all", a wildcard will be used and any domain can access these resources.
Only the domain
nathanf.tk
can utilize CORS
"cors_enabled":true,
"cors_domains":[
"nathanf.tk"
]
Any domain can utilize CORS
"cors_enabled":true,
"cors_domains":[
"all"
]