Can POST requests be served from cache files? | Community
Skip to main content
October 16, 2015
Solved

Can POST requests be served from cache files?

  • October 16, 2015
  • 5 replies
  • 894 views

Hi,

We have a situation where there are few files in the web server cache but not present in publisher or author instances. Any GET requests to these pages are being served properly but few requests triggered with POST are going to publisher instance which is throwing error since the pages are not present.

This is an issue from the source system but intermediately is there any way we can enforce the POST requests to be served from cache using dispatcher settings? CQ version is 5.5. Any help is greatly appreciated.

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 joerghoh

HI,

the dispatcher cannot handle POST requests. It only handle GET requests with no query string.

kind regards,
Jörg

5 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

HI,

the dispatcher cannot handle POST requests. It only handle GET requests with no query string.

kind regards,
Jörg

Sham_HC
Level 10
October 16, 2015

agree with jorg.  If reguest method is post do a proxy pass to get at apache level & dispatcher is not right place for your requirement. 

 
October 16, 2015

Thank you Jorg and Sham. Could you please provide any referral links for the above suggestion to do a proxy pass if you can?

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

HI,

basically you need to configure the dispatcher to accept POST requests and forward them to AEM.

Just something like to the filter section of your dispatcher.any file:

/filter /0001 "POST *" /type "allow"

You might need to narrow this statement a bit (you might not want to allow POST to every path).

Kind regards,
Jörg

October 16, 2015

Hi Jorg, I tried to implement the same by adding the below statement in the filter section of the dispatcher but still the requests are going to publisher. Is the below implementation correct?

/00611 { /type "allow" /glob "POST /xxx/yyy/*.html" }