mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 13:49:15 -05:00
[PR #2493] [CLOSED] feat(resources): add redirect domain management in settings #4935
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?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2493
Author: @LaurenceJJones
Created: 2/17/2026
Status: ❌ Closed
Base:
dev← Head:feat/resource-domain-redirect📝 Commits (2)
e81ce50Add multi-domain redirect support for public resourcesd9d7e7bfeat(resources): add redirect domain management in resource settings📊 Changes
12 files changed (+572 additions, -50 deletions)
View changed files
📝
server/db/pg/schema/schema.ts(+2 -1)📝
server/db/sqlite/schema/schema.ts(+2 -1)📝
server/lib/traefik/getTraefikConfig.ts(+74 -0)📝
server/private/lib/traefik/getTraefikConfig.ts(+74 -0)📝
server/routers/resource/createResource.ts(+19 -3)📝
server/routers/resource/getResource.ts(+22 -4)📝
server/routers/resource/updateResource.ts(+33 -2)📝
server/setup/migrationsPg.ts(+3 -1)📝
server/setup/migrationsSqlite.ts(+3 -1)➕
server/setup/scriptsPg/1.15.5.ts(+24 -0)➕
server/setup/scriptsSqlite/1.15.5.ts(+27 -0)📝
src/app/[orgId]/settings/resources/proxy/[niceId]/general/page.tsx(+289 -37)📄 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
I’m not sure of the best migration approach here, since this feature requires adding a new column to the resources table so its bundle inside of the PR, but maintainers may want to change it to a minor version since its a new feature?
however, there may be another option which we create a dedicate table for this? 🤷🏻
How to test?
When editing a resource, under the general tab you now have "Redirect" options which allow you to set subdomains or another domain (that added in the system) to redirect to the currently edited resource. This is useful as users may host a website on the base domain and requests to
www.should be redirected to the base domain on a permanent redirect (or the reverse depending on the user preference).Before scaffolding this feature the only option would be to create another resource that take the subdomain and points to the same target, however, that is not scalable and creates duplicate records.
Open to comments/feedback on the PR as direction may have to change or may prompt new ideas on how to achieve this.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.