Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
The script prefilter now forces cross-domain requests type to GET.
- Loading branch information
f74b844
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.
@jaubourg Hello. I'm facing an issue because of this addition. This commit apparently doesn't have any comment that explains why the line is added. Could you explain why it's needed? Is it because some sort security issue? Otherwise I'll need to patch it inside my production app to avoid some issues it's facing.
f74b844
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.
As I've double checked CORS' rules, there is the preflight thing, but it's actually something that the browser should care of, not the JS library that performs the AJAX request:
From https://en.wikipedia.org/wiki/Cross-origin_resource_sharing#How_CORS_works
f74b844
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.
@leandro If you can provide more information about the problem as it exists in the code, such as a test case showing the problem, open a new issue on our issue tracker.
f74b844
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.
@dmethvin I don't think it's a bug, because it's clear it's a feature implemented by the committed line above. The issue is that my script is sending data via cross-domain POST (just different subdomains, actually), but then it gets automatically changed to GET because of that line and that breaks my page. I really need to send the data via POST and process the response as 'script'.