Skip to content

Add global IP allowlist middleware#467

Open
TonisOrmisson wants to merge 4 commits intodecolua:masterfrom
TonisOrmisson:feature/ip-allowlist
Open

Add global IP allowlist middleware#467
TonisOrmisson wants to merge 4 commits intodecolua:masterfrom
TonisOrmisson:feature/ip-allowlist

Conversation

@TonisOrmisson
Copy link
Copy Markdown

Summary

Add global IP allowlist middleware for the whole app and API.

Changes

  • add env-driven IP allowlist support via IP_ALLOWLIST_ENABLED and IP_ALLOWLIST
  • enforce allowlist in Next middleware using proxy-forwarded client IP headers
  • keep internal self-calls working by preferring BASE_URL
  • add targeted tests and env/README docs

Test

  • cd tests && npm test -- unit/ip-allowlist.test.js unit/dashboard-guard-ip-allowlist.test.js
    unit/runtime-urls.test.js

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.

1 participant