Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Dispatcher filter to allow only mapped post content

Avatar

Avatar
Validate 1
Level 1
Keerthi97
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Keerthi97
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Keerthi97
Level 1

24-02-2021

Hi All,

I would to like to deny all the post methods by adding below filter 

/0001 {type "deny" /method "POST" }

Then , I have 100+websites running in my AEM application,so how to allow the all configured mapped content paths(present in my application) by adding filter conditions.

Could you please suggest on this and let me know your thoughts .

 

Thanks  in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 3
Level 5
davidjgonzalezzzz
Level 5

Likes

69 likes

Total Posts

77 posts

Correct Reply

31 solutions
Top badges earned
Ignite 3
Affirm 25
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Ignite 3
Level 5
davidjgonzalezzzz
Level 5

Likes

69 likes

Total Posts

77 posts

Correct Reply

31 solutions
Top badges earned
Ignite 3
Affirm 25
Ignite 1
Give Back 5
Give Back 3
View profile
davidjgonzalezzzz
Level 5

24-02-2021

@Keerthi97 there is no magic bullet for this, since there are any number of ways the HTTP POST endpoints maybe have been defined in AEM.

 

In the best case, all your HTTP POST endpoints are bound with well-known Sling selectors -- so like, HTTP POST /content/site-1/page.my-custom-submisssion.json, where `my-custom-submission` is the identifying selector.

 

If you have a set of well-known selectors, you can allow POST whose URLs contain that Selector or Path pattern .. some examples are here  [1]

 

If you have a mix of POST endpoints (resource-type based servlets, path-based servlets, script-based servlets, or even OOTB) then you'll have to go through them and figure out the best set of filters are for what your 100+ sites are using. Hopefully, you'll be able to identify some patterns that let you define allow a single rule per logical endpoint. Definitely think about using the /path configuration that allows patterns (regex) or matching on selectors if you can.

 

[1] https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/c...

Answers (0)