mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 13:49:15 -05:00
[GH-ISSUE #1446] Feature Request: Custom Headers for Individual Pangolin Resources #10675
Reference in New Issue
Block a user
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?
Originally created by @oschwartz10612 on GitHub (Sep 11, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1446
Originally assigned to: @oschwartz10612 on GitHub.
Discussed in https://github.com/orgs/fosrl/discussions/455
Originally posted by hhftechnology April 4, 2025
Overview
Currently, Pangolin doesn't provide a way to set custom HTTP headers for individual resources. We request the ability to configure custom request and response headers for each resource, similar to Cloudflare's Transform Rules for HTTP Request Header Modification.
Problem Statement
When proxying to various backend services, different applications often require specific HTTP headers for proper functionality, authentication, or integration. Without the ability to customize headers at the resource level, users must:
Use Cases
Authorization,X-API-Key, or service-specific auth headersAccess-Control-Allow-Originfor specific servicesX-Forwarded-For,X-Real-IPwith appropriate valuesX-Requested-WithProposed Implementation
Feature Capabilities
UI Integration
Add a new "Headers" tab within each resource configuration alongside the existing "Connectivity" and "Authentication" tabs:
Technical Architecture
Configuration Data Model
Implementation Details
Database Schema Update:
header_rulestable to store header configurationsBackend API Endpoints:
GET /api/v1/resources/{resourceId}/headers- List headers for a resourcePOST /api/v1/resources/{resourceId}/headers- Add a headerPUT /api/v1/resources/{resourceId}/headers/{headerId}- Update a headerDELETE /api/v1/resources/{resourceId}/headers/{headerId}- Delete a headerTraefik Integration:
UI Components:
Example Configuration in Traefik
User Experience
Adding a Header Rule
Migration Consideration
The feature should include:
Security Considerations
Next Steps
We believe this feature would significantly improve Pangolin's flexibility and usefulness for various self-hosting scenarios, allowing it to better serve diverse applications without requiring additional proxies or manual Traefik configuration.