How to Block http://localhost:4502/.json ? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rohan_Garg

@shivamn - There is a general default filter rule for denying json extension requests as below -

# Deny content grabbing for greedy queries and prevent un-intended self DOS attacks
/0017 { /type "deny" /selectors '(feed|rss|pages|languages|blueprint|infinity|tidy|sysview|docview|query|[0-9-]+|jcr:content)' /extension '(json|xml|html|feed)' }

But these rules are valid on Dispatcher and not Author instance (4502).
You can refer below URL for Dispatcher Filter rules -
https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en

2 replies

Rohan_Garg
Community Advisor
Rohan_GargCommunity AdvisorAccepted solution
Community Advisor
May 29, 2023

@shivamn - There is a general default filter rule for denying json extension requests as below -

# Deny content grabbing for greedy queries and prevent un-intended self DOS attacks
/0017 { /type "deny" /selectors '(feed|rss|pages|languages|blueprint|infinity|tidy|sysview|docview|query|[0-9-]+|jcr:content)' /extension '(json|xml|html|feed)' }

But these rules are valid on Dispatcher and not Author instance (4502).
You can refer below URL for Dispatcher Filter rules -
https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en

ManviSharma
Adobe Employee
Adobe Employee
May 29, 2023

Hi,

 

To block requests for URLs ending with ".json" on the Dispatcher, add the following rule in the dispatcher.any file:

 

/ {
/type "deny"
/url "*.json"
}

 

Restart the Dispatcher service for the changes to take effect.