Allow GraphQL endpoints in Dispatcher | Community
Skip to main content
Level 3
June 8, 2023
Solved

Allow GraphQL endpoints in Dispatcher

  • June 8, 2023
  • 1 reply
  • 1017 views

Hi Team,

When I try to access GraphQL GET endpoint in prod environment, I get a 403 forbidden error.

I have the following added in default_filters.any file.

 

 

# Allow GraphQL & preflight requests # GraphQL also supports "GET" requests, if you intend to use "GET" add a rule in filters.any /0060 { /type "allow" /method '(POST|OPTIONS)' /url "/content/_cq_graphql/*/endpoint.json" } # GraphQL Persisted Queries & preflight requests /0061 { /type "allow" /method '(GET|POST|OPTIONS)' /url "/graphql/execute.json*" }

 

 

It works fine in dev and qa environments. Any leads would be of great help. Thanks.

Note: The publish instance of stage and prod also gives 403.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by somen-sarkar

You can download the same from your cloud-manager instance. Check the below article :-

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/logs.html?lang=en#aem-publish-dispatcher-logs

1 reply

somen-sarkar
Community Advisor
Community Advisor
June 8, 2023

Hi, 

It only shows the domain name which is going to 403 page as per your attached screenshot .  What about the other part of the URL that you are trying to access ?  Below points you can consider to debug the same :- 

1) First check if the persisted queries are published or not ? 

2) Check the dispatcher and publish instance logs to check the request flow. 

Thanks,

Somen

rakesh_h2Author
Level 3
June 8, 2023

Hi @somen-sarkar ,

Thank you so much for the response. Could you please help me where to get those logs from?

Thanks,

Rakesh

somen-sarkar
Community Advisor
somen-sarkarCommunity AdvisorAccepted solution
Community Advisor
June 8, 2023