-
-
Notifications
You must be signed in to change notification settings - Fork 7
Allow X-Requested-With with value XMLHttpRequest over XmlHttpRequest #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #109 +/- ##
=======================================
Coverage 98.64% 98.64%
=======================================
Files 18 18
Lines 296 296
=======================================
Hits 292 292
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR corrects the value of the X-Requested-With header from XmlHttpRequest to XMLHttpRequest to align with the standard convention used by JavaScript libraries like jQuery. The change ensures proper detection of AJAX requests.
- Updates the header value check in the middleware from
XmlHttpRequesttoXMLHttpRequest - Updates corresponding test cases to use the corrected header value
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Middleware/Mezzio.php | Updates the X-Requested-With header value check from 'XmlHttpRequest' to 'XMLHttpRequest' |
| spec/Middleware/MezzioSpec.php | Updates four test cases to use the corrected 'XMLHttpRequest' header value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Tested with jQuery, which seems using |
Reference: