2
votes
Nginx Config to serve .json without CORS restriction with ddev
I know this is an oldish question, but I hit a similar issue, so leaving this here for posterity...
Per the ddev docs you can edit the nginx conf file at .ddev/nginx_full/nginx-site.conf.
First of all,...
1
vote
Nginx Config to serve .json without CORS restriction with ddev
For some reason adding the header inside a location clause didn't work for me. This is a very dirty development-only solution but I just added add_header Access-Control-Allow-Origin *; to the end of ...
1
vote
How can I serve a .json file from the web folder without CORS problems?
<FilesMatch "\.(json)$">
<IfModule mod_headers.c>
Header add Content-Type "application/json"
Header add Access-Control-Allow-Methods "GET,HEAD,...
Only top scored, non community-wiki answers of a minimum length are eligible