Repository navigation
ip address middleware - #278
OStefan2001 wants to merge 7 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #278 +/- ##
=============================================
+ Coverage 68.34% 68.35% +0.01%
+ Complexity 616 615 -1
=============================================
Files 95 95
Lines 2350 2351 +1
=============================================
+ Hits 1606 1607 +1
Misses 744 744 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
start over the simples possible implementation |
|
add all checks in the config file |
|
|
||
| declare(strict_types=1); | ||
|
|
||
| // return [ |
There was a problem hiding this comment.
keep this one
add a comment to @see the file cutare from the package cutare
explain each key
extend the headers_to_inspect key to have both CLoudflare and regula rheader
| // 'check_proxy_headers' => false, | ||
| // 'trusted_proxies' => [], | ||
| // 'attribute_name' => 'ip_address', | ||
| // 'headers_to_inspect' => [], |
There was a problem hiding this comment.
add all headers to inspect, including nginx and cloudflare
explanains for each block
//nginx specific
header1
header2
//cloudflare specific
header4
header5
| // - route-based validation | ||
| // - etc. | ||
|
|
||
| $app->pipe(IpAddress::class); |
There was a problem hiding this comment.
move the middleare to the route
we do not want to have this costly analysis at every request
|
|
||
| return [ | ||
| 'rka' => [ | ||
| 'ip_address' => [ |
No description provided.