luckyframework / luckyframework/lucky
Add remote_address assignment to Context
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 2.7k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Starting in Crystal 1.22, `HTTP::Server::Context` will have a `remote_address` property
https://github.com/crystal-lang/crystal/commit/db94c7a7d71f5f1b1b695a4a3a7e22e25af98ac0
Lucky currently patches `HTTP::Request` for this
https://github.com/luckyframework/lucky/blob/692e5b7ef5621638339dcc0b75b697a2283c0cb7/src/charms/request_extensions.cr#L8
https://github.com/luckyframework/lucky/blob/692e5b7ef5621638339dcc0b75b697a2283c0cb7/src/lucky/remote_ip_handler.cr#L32
We should add this in and gate to 1.22 so we can eventually just get rid of the request patch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/charms/request_extensions.cr and src/lucky/remote_ip_handler.cr, then compare the Crystal 1.22 change linked in the issue. Add the remote_address assignment to HTTP::Server::Context behind the 1.22 compatibility gate, while preserving current behavior for older versions. Done means the context receives the remote address without relying solely on the request patch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100