Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting LOCAL_DOMAIN setting - RFC #372

Open
uda opened this issue Feb 26, 2023 · 0 comments
Open

Supporting LOCAL_DOMAIN setting - RFC #372

uda opened this issue Feb 26, 2023 · 0 comments

Comments

@uda
Copy link

uda commented Feb 26, 2023

I started PR #371 because I thought it will be a quick fix, and it should have been, but trying to be robust got me into a corner [Edit: fixed link]

My goal: to support Mastodon's LOCAL_DOMAIN setting - meaning to allow the domain (like social.example.com) be the serving domain for the interface, while users are on another domain (like [email protected] or [email protected] instead of [email protected]) which I'll refer to as the identity domain.
This setup also requires setting up a URL rewrite on the identity domain to point to or proxy some .well-known paths at the serving domain: /.well-known/webfinger, /.well-known/nodeinfo and /.well-known/host-meta
I thought it would be possible to have an optional second domain field, which if filled will serve as the identity domain, and we'll be able to manage those required rewrites

The issue: we can either have a pre-filled domain field (the main domain as the selected value) or a an optional simple string field, the string field means that we will loose accuracy to manage the rewrites

Options:

  1. Use the domain field type, and force all users to make duplicate selections (even those who just want to install Mastodon on some sub-domain or are using a dedicated domain)
  2. Use an optional string field type, and have users who want to separate serving domain from identity domain to fill that out, and have them set up the rewrites manually, maybe give them simple instructions if that field is filled
  3. Option 1, but with an additional boolean field to mark that it should be used, this sounds messy
  4. Option 2, but with an additional boolean field to mark that we should try to install the rewrites if the identity domain is locally managed

I am tempted to work on 4, but I think it is best to hear from actual devs and users, currently, on one installation I need to update the .env.production file manually every upgrade to maintain the LOCAL_DOMAIN setting

[Edit 2]: I see synapse (matrix server) went for option 2, and implement the .well-known without asking specifically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant