ngx-translate/http-loader

App can't find language json files

vlflorian opened this issue · 1 comments

"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

message: "Http failure response for https://project-name.azurewebsites.net/assets/i18n/en.json: 404 Not Found"
name:"HttpErrorResponse"
status:404
statusText:"Not Found"
url:"https://project-name.azurewebsites.net/assets/i18n/en.json"

When in the browser I go to assets/images/anything.jpg, it loads fine. When I rename assets/i18n/en.json to en.json.txt and browse to it, it loads fine. Change it back to .json, won't load again.

Anyone knows how to fix this issue?

Seemed like it was an IIS issue, added web.config with

<staticContent>
            <remove fileExtension=".json"/>
            <mimeMap fileExtension=".json" mimeType="application/json"/>
        </staticContent>

which solved it.