1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-27 22:38:25 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Vishal Rana
b7a781ce5d Add comprehensive tests for IP extraction improvements
Adds tests for issue #2757 IP extraction edge cases where RemoteAddr
may not include a port. The enhanced extractIP function now properly
handles IPv4/IPv6 addresses without ports using net.ParseIP validation.

Test cases cover:
- IPv4 without port
- IPv6 without port
- IPv6 with port brackets
- Invalid IP format handling

Existing tests for issue #2789 response flush error handling are already
comprehensive and validate the improved error messages with ResponseWriter types.

Fixes #2757

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 19:21:57 -07:00
Vladimir Buyanov
a3b0ba24d3 Fix Real IP logic (#2550)
* Fix realIP logic
2024-03-10 19:04:54 +02:00
Martti T
a842444e8f Add SPDX licence comments to files. See https://spdx.dev/learn/handling-license-info/ (#2604) 2024-03-09 11:21:24 +02:00
Wim
7544796946 Remove square brackets from ipv6 addresses in XFF (#2182)
Remove square brackets from ipv6 addresses in XFF
2022-11-24 22:17:31 +02:00
Yusuf Eyisan
124825ee62 Bugfix/1834 Fix X-Real-IP bug (#2007)
* Fix incorrect return ip value for RealIpHeader
* Improve test file to compare correct real IPs to each other and have better comments
* Refactor ip extractor tests to be more readable (longer but readable)

Co-authored-by: toimtoimtoim <desinformatsioon@gmail.com>
2022-03-01 08:56:46 +01:00
Shinichi TAMURA
7c5af01350 Safer/trustable extraction of real ip from request (#1478)
* Safer/trustable extraction of real ip from request

* Fix x-real-ip handling on proxy

* fix docs

* fix default check
2020-02-24 08:29:34 -08:00