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

Post method with html extensions

Avatar

Avatar
Validate 1
Level 1
Keerthi97
Level 1

Likes

0 likes

Total Posts

7 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

7 posts

Correct Reply

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

16-02-2021

Hi All,

I need to block my post configuration on aem dispatcher first and allow only required selectors with extensions on the dispatcher filters.

So, could you please suggest on the way or whether the below filter will allow the post method with html extensions for configuring into the dispatcher.

 

//001 { /type "allow" /method "POST" /url "/content/[.]*.html}

Thanks in advance.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct Reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct Reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Sanket_Kumbharkhane
Level 4

16-02-2021

Hi @Keerthi97 ,

 

if you use the below 1st rule in your filters. any file

/0001 { /type "deny"  /url "*" }

It will deny everything for you including Get and Post [comes as the best practices]

 

and after that, you can allow POST requests.

 

Here are few examples to allow the post method with html & json extension

## allow POSTs to form selectors under content

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

 

## allow POSTs to update the shopping cart

/0003 { /type "allow" /method "POST" /path "/content/[.]*.commerce.cart.json" } 

 

 

/filter {
   /0001 { /type "deny"  /url "*" }
   /0002 { /type "allow" /method "POST" /url "/content/[.]*.form.html" } 
   /0003 { /type "allow" /method "POST" /path "/content/[.]*.commerce.cart.json" } 
}

 

 

Answers (1)

Answers (1)

Avatar

Avatar
Level 1
Sriga311
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Sriga311
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
Sriga311
Level 1

04-03-2021

Hi @Sanket_Kumbharkhane ,

In my scenario, I am having post servlet calls modified in the form of resource types instead of /bin/, so could you please suggest some filters to refine and allow the POST servlets present in my project. Also , there are no identical selectors used in forms present in my application.

 

Thanks for your help