Blocking extension in the suffix | Community
Skip to main content
Level 2
Oct 18, 2022 4:06 PM UTC
Solved

Blocking extension in the suffix

Hi,

 

We have a requirement wherein we need to restrict/block the .json extension under suffix.

For e.g, https://<domain>/content/dam/somepath.form.html/en-us.json

We have tried adding the following dispatcher rule,

/0281 { /type "deny" /path "/content/dam/*" /selectors '(form|selector1)' /extension '(.*infinity.*|.*children.*|.*tidy.*|.*json.*)'}

But when deploying this rule, the cloud deployment pipleline fails. Any idea to fix this issue.

 

Thanks,

Pawan.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SwetaBAccepted solution
Level 4
Oct 18, 2022 6:29 PM UTC

Hi @pawan_g_007 ,

 

Try the below rule

 

/0281 { /type "deny" /path "/content/dam/*/somepath" /selectors '(form|selector1)' /extension '(infinity|children|tidy|json)'}

 

In the above rule I have restricted the path more.

 

1 reply

SwetaBAccepted solution
Level 4
Oct 18, 2022 6:29 PM UTC

Hi @pawan_g_007 ,

 

Try the below rule

 

/0281 { /type "deny" /path "/content/dam/*/somepath" /selectors '(form|selector1)' /extension '(infinity|children|tidy|json)'}

 

In the above rule I have restricted the path more.

 

Translate