Translations: Added UI labels for HTTP method field
Backward Compatibility
No breaking changes: Method field is optional
Existing rules continue to work: NULL/undefined method matches all HTTP methods
Safe database migration: Adding nullable column
Example Usage
// Public read access
{match:"PATH",value:"/api/items",method:"GET",action:"ACCEPT",priority:1}// Require authentication for mutations
{match:"PATH",value:"/api/items",method:"POST",action:"PASS",priority:2}
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2131
Author: @djcrafts
Created: 12/21/2025
Status: 🔄 Open
Base:
main← Head:feature/http-verb-rules📝 Commits (3)
355da6afeat: add HTTP method filtering to resource rulesc946da6rules: add multi-condition AND support\n- Schema: add optional JSON 'conditions'; allow nullable 'match'/'value'\n- APIs: accept/validate conditions in create/update; JSON encode\n- Engine: evaluate method + all conditions (AND); null guards\n- UI: handle nullable fields in rules page\n- Tests: standalone rulesEval helpers; basic path/conditions tests2b3c902fix: legend/tooltip typings for analytics chart📊 Changes
14 files changed (+541 additions, -71 deletions)
View changed files
📝
messages/en-US.json(+3 -0)📝
server/db/pg/schema/schema.ts(+6 -2)📝
server/db/sqlite/schema/schema.ts(+6 -2)📝
server/lib/blueprints/proxyResources.ts(+6 -3)📝
server/lib/blueprints/types.ts(+2 -1)➕
server/lib/rulesEval.ts(+101 -0)📝
server/routers/badger/verifySession.ts(+94 -4)📝
server/routers/resource/createResourceRule.ts(+107 -36)📝
server/routers/resource/listResourceRules.ts(+2 -1)📝
server/routers/resource/updateResourceRule.ts(+60 -4)📝
src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx(+78 -8)📝
src/components/LogAnalyticsData.tsx(+8 -1)📝
src/components/ui/chart.tsx(+12 -9)➕
test/rules.test.ts(+56 -0)📄 Description
Summary
Implements HTTP method filtering for resource rules as requested in #1408.
This allows users to create fine-grained access control policies based on HTTP verbs, enabling scenarios like:
Changes
Backend
methodcolumn toresourceRulestable (SQLite and PostgreSQL)checkRulesfunction to filter rules by HTTP methodFrontend
Backward Compatibility
Example Usage
Closes
Fixes #1408
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.