Forum Discussion
What is the best way to block ajax requests?
I have a page running behind the F5, the application makes queries to a database through AJAX, however for a programming error they left part of the code open, and after the time we discovered that a user made queries from an application through the page through AJAX requests.
The error of the code was solved, blocking those queries.
The query is: what is the best way (with an IRULE LTM, ASM, etc.) to block all AJAX queries that come from a user?
Thank you very much.
- nathe
Cirrocumulus
What about an irule like this?
when HTTP_REQUEST { if { [HTTP::header "X-Requested-With" ] equals "XMLHttpRequest" } { drop } }
Or a custom ASM signature with the following rule?
headercontent:"XMLHttpRequest"; nocase;
To be honest, a bit of a punt this. Other DCers may come back and highlight major errors with these approaches 🙂
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com