Description
Package
next-drupal (NPM package)
Ask the question
Basically, I'm using SSR render on next.js and I want to use drupal.getMenu passing the header cf-ipcountry that i receive on each request depending on the user's country. this isn't related to translation of the menu.
for regulatory reason, i have a case where depending on the country the menu tree change slightly. on drupal side i have only menu and some items are not render in the json of the menu tree if they are not allowed to be displayed in this country.
i saw that it is possible to pass some custom header globally when initializing the drupal client but i didn't found any solution to pass a custom header dynamically when we use the fonction drupal.getMenu.
Maybe i'm wrong so i'm asking to you if that exists, or if we could have a such feature at the call level for getMenu and the others functions line getResourceCollection and so on as well.