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

422 Unprocessable Entity when using local IP address #601

Closed
theblang opened this issue Apr 8, 2016 · 1 comment
Closed

422 Unprocessable Entity when using local IP address #601

theblang opened this issue Apr 8, 2016 · 1 comment

Comments

@theblang
Copy link
Contributor

theblang commented Apr 8, 2016

I have started noticing recently that when I try to register and redirect with Devise Token Auth on my local environment, the redirect fails if I am using any IP address besides localhost. I receive a 422 Unprocessable Entity error code and my response contains an error "Redirect to 'http://10.0.2.2:3001/` not allowed." Examples of IP addresses that cause this are ones like 10.0.2.2 from a virtual machine / simulator, or even 127.0.0.1 on my native desktop. If I replace these IP address with localhost then all works correctly.

@theblang theblang closed this as completed Apr 8, 2016
@theblang
Copy link
Contributor Author

theblang commented Apr 8, 2016

I needed to whitelist the appropriate IP addresses (in addition to localhost) using config.redirect_whitelist.

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

1 participant