Closed caseycesari closed 5 years ago
Both branches fail for me in the same way, which is that json isn't a MIME type that IIS will serve
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Typically we fix this by adding a web.config that removes/adds the *.json extension as a valid MIME type.
However, if their server has already manually been configured to serve *.json, the code looks like it'd work - however, building with the syntax
python build.py dr-region --region-branch transition --framework-branch cpc/fix-translation
still produces language files without the file extension.
Thanks!
Overview
The previous implementation used a dynamic endpoint to serve the translation file, which didn't have a file extension. When we initially migrated the translation backend to the static build, we left the file without an extension. This worked for most installations, but proved to be problematic when serving the app from IIS, which uses a whitelist for serving file extensions. Adding the json file extension also makes more practical sense than using no extension since the file is indeed JSON.
Connects #1163
Testing Instructions
dr-region
site on thefeature/task-1
branch.C:\inetpub\wwwroot\tnc\
and then adding a virtual directory under that site atC:\inetpub\wwwroot\tnc\dr
.es
file fails.es.json
file successfully.