How to enable CORS #1627
|
How can I enable the CORS when using Data API Builder? I know that when I make a Static Web App, I can add the globalHeaders settings in staticwebapp.config.json -file, like this: But how can I do the similar settings in Data API Builder? I'm getting this error because the CORS is not enabled:
|
Replies: 1 comment
|
CORS can be enabled by declaring a The Here's the link to the docs that describes the |
CORS can be enabled by declaring a
corsfield within thehostelement in the config file.The
--cors-originoption of theinitcommand can be used to setup the allowed origins. Init command optionsHere's the link to the docs that describes the
hostsection of the config file: Host element docs