'AEM as a Cloud Service + CIF Addon - /api/graphql not working on Publish SDK

One quick question. As of last week I had completely setup the AEM SDK with the Venia store front with all the components working. When I move the setup the AEM publish SDK, I am encountering one issue.

The /api/graphql is throwing 403 errors which means no frontend commerce operation is happening on the storefront.

I tried adding the /api/graphql to the CSRF filter's exclude list and even removed the POST method from there.

enter image description here

After this I still 403 on GET request of /api/graphql and the following on POST request.

enter image description here

I am I missing some setting?

Note: on the sling servlet resolver config, I have added the /api/graphql but there is no change.

enter image description here

There is a query very similar to this on the groups but there is no response. So thought of raising it here. https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-cif-magento-on-publish...

Please let me know if I am missing something.



Solution 1:[1]

Issue solved.

I introduced a var called COMMERCE in the global vars to solve the problem, since the vhost file refers to it.

I could have done it slightly better but I guess i was lazy :)

Please refer to this link for details:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-cif-magento-on-publish/m-p/442185#M31799

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 godaprojects