Dynamic Media Component - Console Error - 404 - GET /libs/cq/i18n/dict.en-US.json
Hi AEM Community,
I have the below issue -
We are using a dynamic media component for rendering images and videos.
We are using a proxy to path /libs/dam/components/scene7/dynamicmedia
The console in browser is giving the below error -


Here are the points which I could follow -
1. The clientlib category of dynamic media has category 'granite.utils' which calls i18n.js file.

2. The granite.utils clientlib category at /libs/clientlibs/granite/utils has I18n.js with below code -



The code fails at the below lines -
xhr.open("GET", HTTP.externalize(getDictionaryUrl(locale)), false); //getDictionaryUrl(locale) returns "/libs/cq/i18n/dict.en.json"
xhr.send(); //Failed to load resource; server responded with status 404
This does not happen for author instance but only for publish and dispatcher.
The dispatcher blocked the URL /libs/cq/i18n...
[21/Nov/2022:11:21:42 +0000] [I] [cm-pyyyyy-ezzzzzz-aem-publish-6666cdc68-pw22d] "GET /libs/cq/i18n/dict.en_us.json" -0ms [publishfarm/-] [actionblocked] publish-pyyyyy-ezzzzzz.adobeaemcloud.com
We wrote the below filter rules to allow dispatcher to filter this URL -
#Allow i18n dictionary JSON
/0107 { /type "allow" /path "/libs/cq/i18n/*" /extension "json" }
Post this the Publish started rendering the i18n URL correctly -

However, the Dispatcher/Domain Name is still giving 404. On checking the logs here's an interesting observation -
When request coming directly to Publish -
21/Nov/2022:13:15:23 +0000 [223] -> GET /libs/cq/i18n/dict.en-US.json?nocache HTTP/1.1 [cm-pyyyyy-ezzzzzz-aem-publish-6d587785c-5nxcc]
21/Nov/2022:13:15:23 +0000 [223] <- 200 application/json 4ms [cm-pyyyyy-ezzzzzz-aem-publish-6d587785c-5nxcc]
When request coming from Dispatcher -
18/Nov/2022:13:15:36 +0000 [229] -> GET /libs/cq/i18n/dict.en-US.json HTTP/1.1 [cm-pyyyyy-ezzzzzz-aem-publish-6d587785c-5nxcc]
18/Nov/2022:13:15:36 +0000 [229] <- 404 text/html 7ms [cm-pyyyyy-ezzzzzz-aem-publish-6d587785c-5nxcc]
Hence, the request coming directly to publish is being served 200 application/json response type while that coming from Dispatcher is being served with 404 text/html.
Can you please help in resolving the console error ? Should there be a change at component level or etc mappings or Dispatcher configuration ?
@arunpatidar, @mohit_kbansal, @b_sravan, @kautuk_sahni, @vijayalakshmi_s, @markusbullaadobe
Thanks,
Rohan Garg
