i18next-http-backend: Cannot get translation from external public URL
š Bug Report
Hi. Iām trying to load translation file from public URL but I get (failed)net::ERR_FAILED
. URL is correct and I can open it from my browser.
To Reproduce
Here is my config file:
{
debug: true,
lng: 'en',
fallbackLng: 'en',
defaultNS: 'common',
interpolation: {
escapeValue: false,
format: (value, format: string | undefined) => {
if (format === 'uppercase') {
return value.toUpperCase();
}
return value;
},
},
backend: {
crossDomain: true,
loadPath() {
return '<S3_BUCKET>.eu-central-1.amazonaws.com/{{lng}}/{{ns}}.json';
},
},
}
Expected behavior
Should load translation file
Your Environment
- runtime version: i.e. node v12.18.4
- i18next version: i.e. 19.7.0
- os: Mac
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (11 by maintainers)
btw: regarding s3 cors => https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-cors-configuration.html#:~:text=To add a CORS configuration,and then choose CORS configuration. https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors