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

307 Internal Redirect #7

Open
melchoir55 opened this issue Jun 19, 2015 · 2 comments
Open

307 Internal Redirect #7

melchoir55 opened this issue Jun 19, 2015 · 2 comments

Comments

@melchoir55
Copy link

My posts are not redirecting. When I make a post, I only see the OPTIONS request in the network tab. It shows a status code 307 Internal Redirect.

Does anyone know why this is happening, and how to fix it?

@immortal-tofu
Copy link

I encountered same issue. OPTIONS are pre-flight requests and should return a 200 OK. Pre-flight requests are the exact same request but with OPTIONS method. It's sent before the real request to ensure you're allowed to send AJAX on this domain (CORS). Since you redirect this route, OPTIONS get a "307 Internal redirect" in place of a 200.
Solution ? make a pull request since it's not handled yet :(

@cgwyllie
Copy link

cgwyllie commented Jun 8, 2016

Something that might/might not be related: we found that if your server on HTTP sends back HSTS headers for strict transport security, the CORS OPTIONS request gets a 307 internal redirect that doesn't include any CORS headers. The 307 shows a Non-Authorotative-Reason: HSTS header in the response.

This caused the preflight to fail, breaking the request.

Solution for us was to ensure the client is using an HTTPS URL to make the request.

Obviously this might not be related at all depending on your sever setup, but thought I'd pass on the info in case it is useful.

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

3 participants