[PR #1175] [CLOSED] Fix to issues with binding to ports other than 80/443 for web resources #21705

Closed
opened 2026-06-02 04:13:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/1175
Author: @Error-Gap
Created: 7/31/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • c573bb1 Fix to issues with binding to ports other than 80/443 for web resources

📊 Changes

3 files changed (+20 additions, -7 deletions)

View changed files

📝 server/routers/badger/exchangeSession.ts (+9 -2)
📝 server/routers/badger/verifySession.ts (+4 -5)
📝 src/app/auth/resource/[resourceId]/page.tsx (+7 -0)

📄 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

Fix to issues with binding to ports other than 80/443 for HTTP/HTTPS web resources

  • server/routers/badger/verifySession.ts : verifyResourceSession() updated code behind "cleanHost" var to a regex which strips the trailing :port for any port (rather than a string match for 80/443)
  • src/app/auth/resource/[resourceId]/page.tsx : ResourceAuthPage() added a secondary match for serverResourceHost and redirectHost that accounts for ports
  • server/routers/badger/exchangeSession.ts : Updated exchangeSession() to use the same "cleanHost" type var (with port-stripping) as in verifyResourceSession(), replaced references to "host" with "cleanHost"

How to test?

When running from docker, bind the ports in docker-compose with something other than 443:443 and 80:80
(in my case I also changed the "entrypoints" ports for traefik but this may not be necessary)


🔄 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/1175 **Author:** [@Error-Gap](https://github.com/Error-Gap) **Created:** 7/31/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`c573bb1`](https://github.com/fosrl/pangolin/commit/c573bb11498b73ab81463052b1a0a47880699747) Fix to issues with binding to ports other than 80/443 for web resources ### 📊 Changes **3 files changed** (+20 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `server/routers/badger/exchangeSession.ts` (+9 -2) 📝 `server/routers/badger/verifySession.ts` (+4 -5) 📝 `src/app/auth/resource/[resourceId]/page.tsx` (+7 -0) </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 Fix to issues with binding to ports other than 80/443 for HTTP/HTTPS web resources - server/routers/badger/verifySession.ts : verifyResourceSession() updated code behind "cleanHost" var to a regex which strips the trailing :port for any port (rather than a string match for 80/443) - src/app/auth/resource/[resourceId]/page.tsx : ResourceAuthPage() added a secondary match for serverResourceHost and redirectHost that accounts for ports - server/routers/badger/exchangeSession.ts : Updated exchangeSession() to use the same "cleanHost" type var (with port-stripping) as in verifyResourceSession(), replaced references to "host" with "cleanHost" ## How to test? When running from docker, bind the ports in docker-compose with something other than 443:443 and 80:80 (in my case I also changed the "entrypoints" ports for traefik but this may not be necessary) --- <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-02 04:13:04 -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#21705