Reputation: 2572
I have a static react app that I deployed via Github & Azure DevOps to a Static WebApp. I can access index.html and robots.txt just fine, but when I try access a file in the same folder with a different extension (.json), the webbrowser fails to GET with 404. Which file extensions are allowed, and how do I add other file extensions to the allow list?
Upvotes: 0
Views: 1105
Reputation: 136186
Based on the documentation available here
, the configuration for a Static Web App is defined in staticwebapp.config.json
. You can add a section for mime types in that file.
Something like:
"mimeTypes": {
".json": "text/json"
},
...other settings
Upvotes: 1