AEM Dispatcher: POST requests allowed at site root despite filter rules

✨ This content is AI generated and could be inaccurate. Generative AI Terms

This article explains why POST requests to the site root may be allowed through Adobe Experience Manager (AEM) Dispatcher despite filter rules intended to restrict POST requests, and provides steps to resolve the issue.

Description description

Environment

Adobe Experience Manager (AEM) Dispatcher (all versions)

Symptoms

Dispatcher filter rules are configured to allow POST requests only for specific paths and extensions. However, POST requests to the site root node from the Publish server still return HTTP 200 and reach the backend. The expectation is that POST requests should be blocked except for explicitly allowed endpoints. No specific error message is observed; the main symptom is that POST requests to the site root are not being denied as intended.

Cause

Rules without a /method property in the Dispatcher filters.any file apply to all HTTP methods, so POST requests may be allowed unless explicitly denied. The last matching rule takes precedence, so unintended allow rules can override intended restrictions.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Open your filters.any file and review all allow rules.

  2. Identify any rules that do not specify the /method property. Rules without /method apply to all HTTP methods, including POST.

  3. For each allow rule that should only permit GET (or another method), add /method "GET" or the appropriate method. For example:

    /allow { /type "allow" /url "/content/.*" /method "GET" } 

  4. Insert a deny rule near the top of your filter list to block POST (and optionally PUT/DELETE) requests by default. For example:

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

  5. Adjust as needed to allow POST only on specific endpoints.

  6. Deploy the updated Dispatcher configuration to a non-production environment.

  7. Test POST requests to the site root and confirm they are denied (e.g., receive HTTP 403 or 404).

  8. Test POST requests to explicitly allowed endpoints (such as login, forms, or API) to ensure they still work.

  9. Review for overlapping rules to ensure that no other allow rules unintentionally permit POST to broader paths. Scope such rules to their exact intended paths.

  10. Optionally, remove duplicate or unnecessary rules and allow-list only the specific API endpoints that require POST.

recommendation-more-help
experience-cloud-kcs-help-kbarticles