Skip to content

Conversation

@tung2744
Copy link
Contributor

@tung2744 tung2744 commented Dec 23, 2025

ref DEV-3293
ref DEV-3297

Screen.Recording.2025-12-23.at.3.01.59.PM.mov

@tung2744 tung2744 changed the title Implement new ip filter config & portal integration Implement new ip filter config & portal UI Dec 23, 2025
@tung2744 tung2744 changed the base branch from feat-ip-blocklist to main December 23, 2025 07:10
Copy link
Contributor

@carmenlau carmenlau left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-12-24 at 11 42 20

When clicking Check with an invalid IP address, the error message isn’t handled.

"country_codes": {
"geo_location_codes": {
"type": "array",
"items": { "type": "string" }
Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep the restriction that only allows two-character country codes

return defaultAction
}

func (m *IPFilterMiddleware) isRuleMatched(remoteIP net.IP, remoteIPStr string, rule *config.IPFilterRule) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better for the middleware and the portal checkIP mutation to use the same implementation, so we can ensure they produce the same results even if we update the logic in the future. Otherwise, it’s easy to miss updating the portal when changes are made here.

Thought?

appConfigChecksum: rawAppConfigChecksum,
ignoreConflict: ignoreConflict,
});
await reload();
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix app config form will show incorrect state for a while after save

I'd like to know how can I trigger this?

"IPBlocklistScreen.description": "Block traffic by IP address or geographic region to prevent unwanted access and reduce automated threats.",
"IPBlocklistForm.enable.label": "Enable IP Blocklist",
"IPBlocklistForm.ip-address.label": "Blocked IP Addresses",
"IPBlocklistForm.ip-address.description": "Enter a comma-separated list of IP addresses to block. IPv4, IPv6, and CIDR notation for ranges are supported.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should update the copywriting to use newline instead

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