Skip to content

[BE-29] Build IP allowlist and blocklist middleware #355

@mftee

Description

@mftee

Overview

Let admins restrict or block access from specific IPs or CIDR ranges inside backend/cmmty/.

Acceptance Criteria

  • Create backend/cmmty/ip-filter/ with middleware, module, and admin endpoints
  • IpRule entity: id, cidr, type (ALLOW or BLOCK), reason, createdAt
  • Implement POST and DELETE /cmmty/admin/ip-rules
  • Middleware blocks requests from blocked IPs before reaching controllers
  • Support CIDR notation (e.g. 192.168.1.0/24)
  • Write unit tests for IP matching logic

Contribution Folder

All files must be placed inside backend/cmmty/. Do not modify any file outside this folder.

How to Contribute

Comment on this issue to express interest, fork the repo, build inside backend/cmmty/ only, and open a PR targeting main.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions