Hi,
I have a question regarding the production publish environment. I have several servlets created at /bin path of the project,
and have noticed that the GET ones are working fine, but all of the POST method servlets are returning a 403 code (forbidden)when trying to be reached, only in production publish environment.
I've tested many different configurations to check if there was a dispatcher or configuration problem but can't find the reason why I can' reach the POST servlets. I'm assuming it's not a dispatcher fault because the GET servlets under /bin are reached properly.
Any ideas? Configuration on Referrer filter?
Thank in advance,
CarlosD
Views
Replies
Total Likes
Hello @CarlosDa2 ,
There are several probabilities for this issues
403 means its forbidden, so we have CSFR filter , CORS, Permission, Dispatcher rules, all this can leads to this issue
1. CSFR filter is blocking all the unauthorized POST req. so you need to whitelist your servlet in Adobe Granite CSRF Filter configuration
2. CORS - Its very common issue is client & server, check if we allowed the domains to make an req., you need to add CORS header in req.
3. Dispatcher - check if you have any dispatcher rule which is allowing the POST calls
/filter {
/ruleno { /type "allow" /method "POST" /url "/bin/*" }
}
Hi @khamat_bn
Thanks you for your response!
We have a rule in the dispatcher that allowing POST calls like this
/filter {
/ruleno { /type "allow" /method "POST" /url "/bin/*" }
}
And a referrer filter configuration like this (domain name is the real domain name and extension name is the real extension name):
Hi @CarlosDa2 ,
You may refer https://medium.com/@toimrank/aem-post-servlet-e0b07ecc63ac
Thanks
The dispatcher is not involved here, this error message comes from AEM directly.
@CarlosDa2 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies