feat(resources): add redirect domain management in settings #238

Closed
opened 2026-04-05 17:03:18 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @LaurenceJJones on 2/17/2026

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? 🤷🏻

  • add redirect domains section in resource settings
  • add "Add Redirect" flow using DomainPicker
  • validate redirect domains to prevent primary-domain and duplicate entries
  • normalize redirect domains before save (ASCII/lowercase)
  • support removing redirect domains from the configured list
  • add translation-key fallbacks for new redirect copy

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).

image

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.

*Originally created by @LaurenceJJones on 2/17/2026* ## 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? 🤷🏻 - add redirect domains section in resource settings - add "Add Redirect" flow using DomainPicker - validate redirect domains to prevent primary-domain and duplicate entries - normalize redirect domains before save (ASCII/lowercase) - support removing redirect domains from the configured list - add translation-key fallbacks for new redirect copy ## 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). <img width="1767" height="711" alt="image" src="https://github.com/user-attachments/assets/8108555e-079d-465c-84e9-2b58eeaa54af" /> 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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#238