Hi All,
In the author and publish instances the persisted queries working fine. but on the dispatcher, it is not working.
I have added the below rules in the rewrite and dispatcher.any files
in rewrite file
RewriteCond %{REQUEST_URI} ^/graphql/execute.json
RewriteRule ^/(.*)$ /$1;.json [PT]
in dispatcher.any
/0060 { /type "allow" /method '(POST|OPTIONS)' /url "/content/_cq_graphql/*/endpoint.json" }
/0061 { /type "allow" /method '(GET|POST|OPTIONS)' /url "/graphql/execute.json*" }
Thanks,
RadhaKrishna
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi All,
The request was going to a different dispatcher and publish instance and I was working on another setup. We added above mentioned rewrite rules and dispatcher rules in our server setup and started working.
Thank you all.
Hello @n_radhakrishna
Can you please try following?
Filter
/0502 { /type "allow" /extension "json" /path "/graphql/execute" /method "GET" }
Rewrite
RewriteCond %{REQUEST_URI} ^/graphql/execute.json
RewriteRule ^/(.*)$ /$1;.json [PT]
Also, please elaborate what you mean by not working?
Hi Anchal,
In the publish instance when I access the persisted query, I see JSON response and getting persistence error in the dispatcher, and in the network tab status is 404.
screenshot - dispatcher status 404
screenshot - publish instance status 200
Are you executing the query on publish as anonymous user? I mean without a session?
As @Mahedi_Sabuj suggested, update these variables to get detailed logs
Define DISP_LOG_LEVEL debug
Define REWRITE_LOG_LEVEL trace2
Hi @n_radhakrishna, It seems like the request is being blocked by filters. To identify which filter rules are causing this, I suggest reviewing the dispatcher.log where you should be able to pinpoint the specific filter rules responsible for blocking the request.
Hi All,
The request was going to a different dispatcher and publish instance and I was working on another setup. We added above mentioned rewrite rules and dispatcher rules in our server setup and started working.
Thank you all.
Views
Likes
Replies