Allow Post request on AEM page from external application | Community
Skip to main content
sunily21159739
May 2, 2022
Solved

Allow Post request on AEM page from external application

  • May 2, 2022
  • 2 replies
  • 6908 views

Hi All,

I am using AEM 6.4. One of our external team is trying to redirect on our AEM page and sending data through form action as POST request but our AEM page is not accessible from third party side. Please suggest how can I allow Post request on AEM page from external side.

I have checked the logs, dispatcher is blocking the request and request is not able to reach upto Publisher.

 

thanks

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 DEBAL_DAS

As the dispatcher is blocking the POST request so you need to enable the POST requests

The following example filter allows submitting form data by the POST method:

/filter {
    /0001  { /glob "*" /type "deny" }
    /0002 { /type "allow" /method "POST" /url "/content/[.]*.form.html" }
}

@arunpatidar , I was referring your old reply and you have highlighted one important point

"you can create your servlet with some selectors and allow only those selector requests to avoid other open post request url as well from your project. "

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-dispatcher-post-method-configurations/td-p/397093

 

We need to follow the above step also, correct me.

2 replies

arunpatidar
Community Advisor
Community Advisor
May 3, 2022
DEBAL_DAS
DEBAL_DASAccepted solution
May 3, 2022

As the dispatcher is blocking the POST request so you need to enable the POST requests

The following example filter allows submitting form data by the POST method:

/filter {
    /0001  { /glob "*" /type "deny" }
    /0002 { /type "allow" /method "POST" /url "/content/[.]*.form.html" }
}

@arunpatidar , I was referring your old reply and you have highlighted one important point

"you can create your servlet with some selectors and allow only those selector requests to avoid other open post request url as well from your project. "

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-dispatcher-post-method-configurations/td-p/397093

 

We need to follow the above step also, correct me.

arunpatidar
Community Advisor
Community Advisor
May 3, 2022

Indeed we have to block all undesired post requests.

Arun Patidar