Skip to content
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

Supporting Entity Update operations when using CORS #21

Open
rjcorwin opened this issue May 15, 2015 · 1 comment
Open

Supporting Entity Update operations when using CORS #21

rjcorwin opened this issue May 15, 2015 · 1 comment

Comments

@rjcorwin
Copy link

Turns out the mysterious OPTIONS request we saw when doing a PATCH request is not jDrupal. Browsers do a "pre-flight" OPTIONS request before sending data over the wire to make sure that the target server is going to allow it. The details on when a browser does this pre-flight and when it doesn't are fuzzy. For example, when I do minimal headers on a POST, I don't see a OPTIONS request but trying the same technique for PATCH still results in an OPTIONS request. Maybe there is some way to prevent the pre-flight but I haven't found it yet... Why does this matter? Because the rest module for D8 doesn't support OPTIONS requests. It's listed as the only rest-critical at the moment and the last activity on it was 6 months ago. Per Dries's comment on getting CORS options into the Drupal admin so we don't have to do header() manually in settings.php, it sounds like consensus is that JS apps doing CORS to Drupal are going to have to wait until 8.1 (unless we do something about it).

@signalpoint
Copy link
Owner

@rjsteinert thank you for the thorough follow up on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants