mirror of
https://github.com/karant-dev/AutoRedact.git
synced 2026-04-26 00:05:52 +03:00
[PR #13] [CLOSED] Add Global Allowlist for Safe IPs/Domains #16
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AutoRedact#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/karant-dev/AutoRedact/pull/13
Author: @Copilot
Created: 12/12/2025
Status: ❌ Closed
Base:
main← Head:copilot/add-global-allowlist-feature📝 Commits (4)
c7f2cdfInitial plan098f72aInitial plan for Global Allowlist featurea0f7d9dAdd Global Allowlist feature for safe values that should skip redaction68f7f2cAddress code review feedback: consistent trim logic and O(1) Set lookups for allowlist📊 Changes
12 files changed (+346 additions, -47 deletions)
View changed files
📝
package-lock.json(+0 -12)📝
src/App.tsx(+16 -5)📝
src/components/Header.tsx(+17 -1)➕
src/components/SettingsModal.tsx(+143 -0)➕
src/constants/allowlist.ts(+41 -0)➕
src/contexts/AllowlistContext.tsx(+46 -0)➕
src/contexts/AllowlistContextDef.ts(+10 -0)➕
src/hooks/useAllowlist.ts(+10 -0)📝
src/hooks/useBatch.ts(+2 -2)📝
src/hooks/useOCR.ts(+28 -13)📝
src/main.tsx(+4 -1)📝
src/utils/ocr.ts(+29 -13)📄 Description
Users needed a way to prevent common safe values (localhost IPs, public DNS) from being redacted. This adds a configurable allowlist with sensible defaults and case-insensitive matching.
Changes
Allowlist Configuration (
src/constants/allowlist.ts)127.0.0.1,localhost,0.0.0.0,::1, private ranges (192.168.x.x,10.0.0.1), public DNS (8.8.8.8,1.1.1.1)State Management
AllowlistContextwith localStorage persistenceuseAllowlisthook for component accessOCR Integration
useOCR.tsandutils/ocr.tsfilter matches against allowlist before redactionUI
Screenshots
Settings Button
Settings Modal
Additional Fix
Changed
imageReftoloadedImagestate inuseOCRto resolve pre-existing lint error (ref accessed during render).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.