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
Add remote_ip to request #955
Comments
I tried to do something about this but it turned out that Crystal is making things hard. As far as I understand Crystal provides no remote IP in the Request object which would make it necessary to rely on headers such as |
@firoxer It looks like one of the following needs to happen.
I found crystal-lang/crystal#5784 and https://github.com/crystal-lang/crystal/pull/7610/files both being fairly recent and relevant to the issue at hand. |
I could head this. Does request contain remote_ip now? |
Yes, I believe so. |
This is fixed by standard library |
Description
Many people have asked how to find the ip of the client as they so easily can in Rails.
Rails does it with this middleware. Would be super useful to Amber and I'm sure Lucky, and Kemal if this middleware was converted to crystal.
https://github.com/rails/rails/blob/5-2-1/actionpack/lib/action_dispatch/middleware/remote_ip.rb
The text was updated successfully, but these errors were encountered: