Asset file is not found (404) if it is in a folder that contains an underscore
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Asset files are not found during fetching with javascript or accessing them through the browser when they are located in a folder that contains an underscore. The follow error is returned:
`The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.`
And the following is printed to the browser's console:
```
GET https://.westeurope.5.azurestaticapps.net/assets/app_data/data.json 404 (Not Found)
GET https://.westeurope.5.azurestaticapps.net/app_data/data.json 404 (Not Found)
```
The above behavior is observed while deploying a simple Vue3 app using SWA cli and GitHub action. The same code works fine on the local development server, and the issue only appears after deployment to SWA.
**To Reproduce**
Steps to reproduce the behavior:
With multiple `data.json` files located at the paths shown in the code below, those that are located in `*/app_data/` folder could not be retrieved.
```javascript
fetch("/data.json") --> OK
fetch("/assets/data.json") --> OK
fetch("/assets/app_data/data.json") --> 404
fetch("/app_data/data.json") --> 404
fetch("/appdata/data.json") --> OK
fetch("/app-data/data.json") --> OK
fetch("/d.a_t(a).json") --> OK
```
**Expected behavior**
The files should be accessible without a problem.
**Screenshots**


**Device info (if applicable):**
- OS: Windows 10
- Browser: Edge
- Version 123.0.2420.97
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.