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
1. This PR implements the 2.2 Multiple Hostnames for a Single Resource, addressing issue #906. 2. Support Multiple Domains per Resource with Primary Domain Redirect Option, addressing issue #1243.
🔑 Key Features
Multiple Domains per Resource
Users can now specify more than one domain for a single resource.
Two Host Modes
Primary Domain Redirect Mode
Allows selecting one domain as the primary.
All other assigned domains are redirected (HTTP 301) to the primary domain.
Helps maintain canonical URLs & SEO consistency.
Multi-Domain Mode
All assigned domains serve the resource directly.
No redirects performed — each domain remains independently accessible.
How to test?
🔄 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/1346
**Author:** [@Pallavikumarimdb](https://github.com/Pallavikumarimdb)
**Created:** 8/25/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `enhancement-#906/multiple-hostnames`
---
### 📝 Commits (10+)
- [`ef4da05`](https://github.com/fosrl/pangolin/commit/ef4da055ff1c30b54011dfe661938ed805f3374c) UI to add multiple domains per resources
- [`5aaa3e6`](https://github.com/fosrl/pangolin/commit/5aaa3e68470959349559aab5ebb7f5d99a13e5e1) initial backend code
- [`a1d06c0`](https://github.com/fosrl/pangolin/commit/a1d06c0ee23b39f3a26c7b74a2704673af255fcf) update and add multiple domains
- [`9cfe369`](https://github.com/fosrl/pangolin/commit/9cfe3690bc902c1a60a05a5bdfeff992d3f608bb) pg schema
- [`7fc71c8`](https://github.com/fosrl/pangolin/commit/7fc71c8d6df00f922d1d8cfaccd51abc85df6773) pg schema fix
- [`1d70e32`](https://github.com/fosrl/pangolin/commit/1d70e321c05f205d2dadefdc9ee11ad56fc598a3) createdAt data to default
- [`41abee3`](https://github.com/fosrl/pangolin/commit/41abee370e067c4e0dc3c873a02a8d9086ce005c) remove auto date update
- [`84af39f`](https://github.com/fosrl/pangolin/commit/84af39f2d4e9b807695d08253a847fede14fe4c3) update domain utils
- [`5bffa08`](https://github.com/fosrl/pangolin/commit/5bffa0865e9ae44de24aecc7ba694caf86f1967d) fix lint
- [`37a847b`](https://github.com/fosrl/pangolin/commit/37a847b40e43dbb4cb8c14a2bf16a0a02970d85a) fix mixed type
### 📊 Changes
**10 files changed** (+1656 additions, -289 deletions)
<details>
<summary>View changed files</summary>
📝 `server/db/pg/schema.ts` (+24 -4)
📝 `server/db/sqlite/schema.ts` (+23 -3)
📝 `server/lib/domainUtils.ts` (+43 -23)
📝 `server/routers/resource/createResource.ts` (+143 -26)
📝 `server/routers/resource/getResource.ts` (+51 -9)
📝 `server/routers/resource/updateResource.ts` (+322 -58)
📝 `server/routers/traefik/getTraefikConfig.ts` (+175 -16)
📝 `src/app/[orgId]/settings/resources/[niceId]/general/page.tsx` (+560 -123)
📝 `src/app/[orgId]/settings/resources/create/page.tsx` (+234 -25)
📝 `src/components/DomainPicker.tsx` (+81 -2)
</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
**1. This PR implements the `2.2 Multiple Hostnames for a Single Resource`, addressing issue #906.**
**2. Support Multiple Domains per Resource with Primary Domain Redirect Option, addressing issue #1243.**
### 🔑 Key Features
* **Multiple Domains per Resource**
* Users can now specify more than one domain for a single resource.
* **Two Host Modes**
1. **Primary Domain Redirect Mode**
* Allows selecting one domain as the primary.
* All other assigned domains are redirected (HTTP 301) to the primary domain.
* Helps maintain canonical URLs & SEO consistency.
2. **Multi-Domain Mode**
* All assigned domains serve the resource directly.
* No redirects performed — each domain remains independently accessible.
<img width="1558" height="848" alt="image" src="https://github.com/user-attachments/assets/b73e7cc9-0682-4c75-9264-7a5fa69a327f" />
## How to test?
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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/1346
Author: @Pallavikumarimdb
Created: 8/25/2025
Status: ❌ Closed
Base:
dev← Head:enhancement-#906/multiple-hostnames📝 Commits (10+)
ef4da05UI to add multiple domains per resources5aaa3e6initial backend codea1d06c0update and add multiple domains9cfe369pg schema7fc71c8pg schema fix1d70e32createdAt data to default41abee3remove auto date update84af39fupdate domain utils5bffa08fix lint37a847bfix mixed type📊 Changes
10 files changed (+1656 additions, -289 deletions)
View changed files
📝
server/db/pg/schema.ts(+24 -4)📝
server/db/sqlite/schema.ts(+23 -3)📝
server/lib/domainUtils.ts(+43 -23)📝
server/routers/resource/createResource.ts(+143 -26)📝
server/routers/resource/getResource.ts(+51 -9)📝
server/routers/resource/updateResource.ts(+322 -58)📝
server/routers/traefik/getTraefikConfig.ts(+175 -16)📝
src/app/[orgId]/settings/resources/[niceId]/general/page.tsx(+560 -123)📝
src/app/[orgId]/settings/resources/create/page.tsx(+234 -25)📝
src/components/DomainPicker.tsx(+81 -2)📄 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
1. This PR implements the
2.2 Multiple Hostnames for a Single Resource, addressing issue #906.2. Support Multiple Domains per Resource with Primary Domain Redirect Option, addressing issue #1243.
🔑 Key Features
How to test?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.