Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Can POST requests be served from cache files?

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

HI,

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

kind regards,
Jörg

View solution in original post

5 Replies

Avatar

Correct answer by
Employee Advisor

HI,

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

kind regards,
Jörg

Avatar

Level 10

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. 

 

Avatar

Level 1

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

Avatar

Employee Advisor

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

Avatar

Level 1

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" }