[PR #3172] Feature response headers #33495

Open
opened 2026-06-15 10:54:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/3172
Author: @Gulianrdgd
Created: 5/27/2026
Status: 🔄 Open

Base: devHead: feature-response-headers


📝 Commits (8)

📊 Changes

27 files changed (+271 additions, -121 deletions)

View changed files

📝 messages/bg-BG.json (+4 -2)
📝 messages/cs-CZ.json (+4 -2)
📝 messages/de-DE.json (+4 -2)
📝 messages/en-US.json (+4 -2)
📝 messages/es-ES.json (+4 -2)
📝 messages/fr-FR.json (+4 -2)
📝 messages/it-IT.json (+4 -2)
📝 messages/ko-KR.json (+4 -2)
📝 messages/nb-NO.json (+4 -2)
📝 messages/nl-NL.json (+4 -2)
📝 messages/pl-PL.json (+4 -2)
📝 messages/pt-PT.json (+4 -2)
📝 messages/ru-RU.json (+4 -2)
📝 messages/tr-TR.json (+4 -2)
📝 messages/zh-CN.json (+4 -2)
📝 messages/zh-TW.json (+4 -2)
📝 server/db/pg/schema/schema.ts (+2 -1)
📝 server/db/sqlite/schema/schema.ts (+2 -1)
📝 server/lib/blueprints/proxyResources.ts (+15 -6)
📝 server/lib/blueprints/types.ts (+3 -1)

...and 7 more files

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Closes #2789 and feature request: #1939

Pangolin previously only supported injecting custom headers into requests forwarded to downstream targets (customRequestHeaders). This PR adds responseHeaders and renames the existing headers field to requestHeaders throughout the stack for clarity. This was already possible in Treafik, so it was simply adding responseHeaders to the code where (request) headers appeared.

The blueprint code is also updated to still be backwards compatible. headers in pangolin.yml works as alias for requestHeaders. Both requestHeaders and responseHeaders are now accepted and if both headers and requestHeaders are specified, they are merged.

I also let Claude do the translations, I am unsure if they are correct. But the languages I speak are good.

I created a PR before, without reading the CONTRIBUTING.md (very sorry about that). In that PR wrote some migrations, so when you need to make them you can copy them. There are also some remarks from copilot which I fixed. https://github.com/fosrl/pangolin/pull/3171

How to test?

  • Set request and response headers on a resource via the UI, save, and confirm the Traefik dynamic config reflects both customRequestHeaders and customResponseHeaders
  • curl -v through Traefik confirms response headers appear on the HTTP response and request headers arrive at the upstream target
  • Existing resources with headers set in a blueprint continue to work after migration

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/3172 **Author:** [@Gulianrdgd](https://github.com/Gulianrdgd) **Created:** 5/27/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `feature-response-headers` --- ### 📝 Commits (8) - [`9804c0d`](https://github.com/fosrl/pangolin/commit/9804c0db289308003c95d4913bb2017cee66e93d) Ready for testing - [`c8357e8`](https://github.com/fosrl/pangolin/commit/c8357e8653d825c266e41d6a6094018713943daa) tested and translated! - [`6c7d345`](https://github.com/fosrl/pangolin/commit/6c7d345f033ca670f4d80806dfce573c4d5856dd) Reverted package-lock.json - [`9d60626`](https://github.com/fosrl/pangolin/commit/9d6062619c2dd1e2dc438a4377e40b91378b00fc) Forgot about blueprints - [`382f5d5`](https://github.com/fosrl/pangolin/commit/382f5d52184dcb7b712d15427b8cd87a4b625eef) Fixed copilot issue. - [`8dee505`](https://github.com/fosrl/pangolin/commit/8dee505eb25ec517f4515df4d5f2da7d590bfbf4) Fixed copilot issue. - [`6952d3b`](https://github.com/fosrl/pangolin/commit/6952d3bee7cde9409d5a51fd68960bc17cca5a5d) Fixed copilot issue. - [`713e245`](https://github.com/fosrl/pangolin/commit/713e24503db0562f81eada4e0062466d061a440e) Removed migrations ### 📊 Changes **27 files changed** (+271 additions, -121 deletions) <details> <summary>View changed files</summary> 📝 `messages/bg-BG.json` (+4 -2) 📝 `messages/cs-CZ.json` (+4 -2) 📝 `messages/de-DE.json` (+4 -2) 📝 `messages/en-US.json` (+4 -2) 📝 `messages/es-ES.json` (+4 -2) 📝 `messages/fr-FR.json` (+4 -2) 📝 `messages/it-IT.json` (+4 -2) 📝 `messages/ko-KR.json` (+4 -2) 📝 `messages/nb-NO.json` (+4 -2) 📝 `messages/nl-NL.json` (+4 -2) 📝 `messages/pl-PL.json` (+4 -2) 📝 `messages/pt-PT.json` (+4 -2) 📝 `messages/ru-RU.json` (+4 -2) 📝 `messages/tr-TR.json` (+4 -2) 📝 `messages/zh-CN.json` (+4 -2) 📝 `messages/zh-TW.json` (+4 -2) 📝 `server/db/pg/schema/schema.ts` (+2 -1) 📝 `server/db/sqlite/schema/schema.ts` (+2 -1) 📝 `server/lib/blueprints/proxyResources.ts` (+15 -6) 📝 `server/lib/blueprints/types.ts` (+3 -1) _...and 7 more files_ </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description Closes #2789 and feature request: #1939 Pangolin previously only supported injecting custom headers into requests forwarded to downstream targets (`customRequestHeaders`). This PR adds `responseHeaders` and renames the existing `headers` field to `requestHeaders` throughout the stack for clarity. This was already possible in Treafik, so it was simply adding responseHeaders to the code where (request) headers appeared. The blueprint code is also updated to still be backwards compatible. `headers` in `pangolin.yml` works as alias for `requestHeaders`. Both `requestHeaders` and `responseHeaders` are now accepted and if both `headers` and `requestHeaders` are specified, they are merged. I also let Claude do the translations, I am unsure if they are correct. But the languages I speak are good. I created a PR before, without reading the CONTRIBUTING.md (very sorry about that). In that PR wrote some migrations, so when you need to make them you can copy them. There are also some remarks from copilot which I fixed. https://github.com/fosrl/pangolin/pull/3171 ## How to test? - Set request and response headers on a resource via the UI, save, and confirm the Traefik dynamic config reflects both `customRequestHeaders` and `customResponseHeaders` - `curl -v` through Traefik confirms response headers appear on the HTTP response and request headers arrive at the upstream target - Existing resources with `headers` set in a blueprint continue to work after migration --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-15 10:54:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#33495