ngx-translate / http-loader

A loader for ngx-translate that loads translations with http calls
MIT License
191 stars 69 forks source link

App can't find language json files #57

Closed vlflorian closed 6 years ago

vlflorian commented 6 years ago

"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?

vlflorian commented 6 years ago

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.