Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Getting 405 error for post request

Avatar

Level 1

Hi Team,

 

When I am trying to create a site through post request in postman, I am getting "405 method not allowed". I used below key value pair in "x-www-form-urlencoded" in postman:-

srcPath:-/apps/msm/we-retail/blueprintconfigs/we-retail-screens

destPath:-/content/we-retail/us/en/experience

./jcr:title-aksh03

 

Kindly suggest on this issue.

 

Thanks and regards,

Akshay Shukla

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi @akshay_shukla,

Please confirm if "Apache Sling Referrer Filter" is configured like below:

  1. Enable allow empty
  2. Remove the POST method from filters

In OSGI configurations (http://localhost:4502/system/console/configMgr), locate “Apache Sling Referrer Filter”. Enable the allow empty property, and remove the post method from filters property.

Secondly, in OSGI configurations (http://localhost:4502/system/console/configMgr), locate “Adobe Granite CSRF Filter”. Remove the post method from filters property.

After making configurations to the two OSGI configurations, you should be able to make a POST request from your HTTP REST Client to your AEM instance.

Thanks!!

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi @akshay_shukla,

Please confirm if "Apache Sling Referrer Filter" is configured like below:

  1. Enable allow empty
  2. Remove the POST method from filters

In OSGI configurations (http://localhost:4502/system/console/configMgr), locate “Apache Sling Referrer Filter”. Enable the allow empty property, and remove the post method from filters property.

Secondly, in OSGI configurations (http://localhost:4502/system/console/configMgr), locate “Adobe Granite CSRF Filter”. Remove the post method from filters property.

After making configurations to the two OSGI configurations, you should be able to make a POST request from your HTTP REST Client to your AEM instance.

Thanks!!