AEM servlet from external application | Community
Skip to main content
rajeshs28932860
Level 3
Mar 25, 2019 6:13 PM UTC

AEM servlet from external application

Hi

I am calling my servlet from external application creating a Ajax call invoking csrf token and uploading asset to them.

I get 403 while invoking the servlet. If I remove post from referrer it works. Is there any way to remove post restriction for particular servlet ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

arunpatidar
New Participant
Apr 29, 2019 7:23 PM UTC

Hi,

Did you updated the Apache Sling Referrer Filter configuration in order to add host (Allow Hosts property)which can post to aem

Translate
Arun Patidar
smacdonald2008
Level 10
Mar 25, 2019 10:23 PM UTC

You can also remove auth requirements so your 3rd party app can successfully invoke it.

Translate
rajeshs28932860
Level 3
Mar 25, 2019 11:02 PM UTC

Hi Smac

How do I do that ? Any security issue doing it ?

Translate
rajeshs28932860
Level 3
Mar 25, 2019 11:32 PM UTC

And if I remove Auth req to the servlet how does it upload file to dam. I am sending csrf token in the header for the servlet to add file to DAM. Will it not impact?

Translate