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

Recommend BaseURL for Fjord Launcher and HMCL #123

Closed
wants to merge 1 commit into from

Conversation

catfromplan9
Copy link
Contributor

HMCL and Fjord Launcher both support handling X-Authlib-Injector-API-Location header, so BaseURL can be used instead of AuthlibInjectorURL

@evan-goode
Copy link
Member

Given some thought, this would probably be fine, but I'd rather not do it because

  1. https://drasl.example.com/authlib-injector is the canonical, correct URL for the authlib-injector endpoint, and we should be conservative in what we send and liberal in what we accept.
  2. In light of Allow for custom frontends #122, what if the custom front end copies these setup instructions but forgets the header on /?
  3. There's not much benefit to the user, it's a little quicker to type, but these are already links that can easily be copied and pasted, or dragged and dropped onto Fjord Launcher (which authlib-injector specifies, strangely)

@catfromplan9
Copy link
Contributor Author

Given some thought, this would probably be fine, but I'd rather not do it because

1. https://drasl.example.com/authlib-injector is the canonical, correct URL for the authlib-injector endpoint, and we should [be conservative in what we send and liberal in what we accept](https://en.wikipedia.org/wiki/Robustness_principle).

2. In light of [Allow for custom frontends #122](https://github.com/unmojang/drasl/issues/122), what if the custom front end copies these setup instructions but forgets the header on `/`?

3. There's not much benefit to the user, it's a little quicker to type, but these are already links that can easily be copied and pasted, or dragged and dropped onto Fjord Launcher (which authlib-injector [specifies](https://github-com.translate.goog/yushijinhun/authlib-injector/wiki/%E5%90%AF%E5%8A%A8%E5%99%A8%E6%8A%80%E6%9C%AF%E8%A7%84%E8%8C%83?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US#%E9%80%9A%E8%BF%87%E6%8B%96%E6%8B%BD%E8%AE%BE%E7%BD%AE), strangely)

Perhaps drasl could allow for manually overwriting the AuthlibInjectorURL by checking for its definition in the config?

@evan-goode
Copy link
Member

Well, the AuthlibInjectorURL per se (authlib-injector API root) should not be customizable, this is more related to what URL is suggested to users. I think the best way would be to allow users to more easily customize everything that's on the home page/configuration page (should those be separated at some point). Maybe via placing Go template files somewhere under StateDirectory?

@evan-goode evan-goode closed this Dec 28, 2024
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

Successfully merging this pull request may close these issues.

2 participants