Fetching custom header details from AEM CIF cloud config for multi region, langauge application
Hello team,
Query is related to: CIF graphql configuration
In my application, we have introduced region, language based (Multi region) product display.
For this, I have created separate CIF configurations under these folders.
/conf/abc/FR/en
/conf/abc/FR/fr
/conf/abc/GB/gb
/conf/abc/GB/en
Also, enabled custom http headers using: com.adobe.cq.cif.http.internal.HttpHeadersConfigProviderImpl
Now, in above 4 CIF configurations, I have eneabled custom httpHeaders : region, language:
example: /conf/abc/FR/en
region: fr, language: en
/conf/abc/FR/fr Here region: fr, language: fr
Now, in my content pages, I will mentione these in the page properties -> Advanced -> Cloud configuration
example: /content/abc/fr/en : mentioning: /conf/abc/FR/en
/content/abc/fr/fr : mentioning: /conf/abc/FR/fr
Now, I need to get the headers details: /conf/abc/FR/en/settings/cloudconfigs/commerce/jcr:content/httpHeadersTree
in my sling model. will get "cq:conf" path. Then, go to the httpHeadersTree section
Get all details. pass this while calling the graphQL API.
Is this approach right? Wanted to utilize out of the box feature in most of the cases.
Note: As of now, in my custom sling model class, to get the MagentoGraphqlClient object, using this config file: com.adobe.cq.commerce.graphql.client.impl.GraphqlClientImpl~default.cfg
Thanks in advance