Skip to content

ip address middleware - #278

Open
OStefan2001 wants to merge 7 commits into
developfrom
ip-detection-middleware
Open

OStefan2001 wants to merge 7 commits into
developfrom
ip-detection-middleware

Conversation

@OStefan2001

Copy link
Copy Markdown
Collaborator

No description provided.

@OStefan2001
OStefan2001 requested a review from bidi47 October 13, 2026 15:33
@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.35%. Comparing base (894208d) to head (bbf4e5c).
⚠️ Report is 4 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arhimede

Copy link
Copy Markdown
Member

start over
only implement that package from akrabat , that's all

the simples possible implementation

@arhimede

Copy link
Copy Markdown
Member

add all checks in the config file
in all possible headers
https://github.com/akrabat/ip-address-middleware/blob/main/src/Mezzio/config/ip_address.global.php.dist


declare(strict_types=1);

// return [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' => [],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add all headers to inspect, including nginx and cloudflare
explanains for each block
//nginx specific
header1
header2
//cloudflare specific
header4
header5

Comment thread config/pipeline.php
// - route-based validation
// - etc.

$app->pipe(IpAddress::class);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the middleare to the route
we do not want to have this costly analysis at every request


return [
'rka' => [
'ip_address' => [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chnange it to camelCase

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

Successfully merging this pull request may close these issues.

2 participants