Add /@<username> route #279

Open
opened 2022-11-15 14:25:25 +00:00 by catgirlinspace · 9 comments

Currently going to something like https://fediverse.catgirlin.space/@catgirl leads to nothing. This route should either 301 redirect to /<username> or return the profile with a canonical (see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)

Currently going to something like https://fediverse.catgirlin.space/@catgirl leads to nothing. This route should either 301 redirect to `/<username>` or return the profile with a canonical (see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)

wowee getting started with the issue that tore pleroma apart are we

wowee getting started with the issue that tore pleroma apart are we

this particular route was the one that finally killed pleroma

the question was always "why should the @xyz lead somewhere?" there's no technical reason or anything

this particular route was the one that finally killed pleroma the question was always "why should the @xyz lead somewhere?" there's no technical reason or anything
Author

What happened with pleroma? Am unfamiliar with the events of it.

What happened with pleroma? Am unfamiliar with the events of it.

delve into this history at your own risk

https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3576

delve into this history at your own risk https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3576
Author

Seems silly to argue about what is seemingly a simple thing. If adding /@<username> is something that won't be considered due to this, is there a way to do this from nginx?

Seems silly to argue about what is seemingly a simple thing. If adding `/@<username>` is something that won't be considered due to this, is there a way to do this from nginx?
Member

I think it's more intuitive than user/asdfjsdff

I think it's more intuitive than user/asdfjsdff
Contributor

this particular route was the one that finally killed pleroma

the question was always "why should the @xyz lead somewhere?" there's no technical reason or anything

meaningless drama analysis

as far as i'm concerned the issue wasn't actually "why should we have @:user", it was more about gleason abusing his powers and adding hacky code to pleroma be to support specifically soapbox instead of just . adding it to soapbox.
fundamentally i think adding a @ path is fine, we already have /users/:user and /user going to the same place in the frontend, as long as it's discussed beforehand (like we're doing just now)

> this particular route was the one that finally killed pleroma > > > the question was always "why should the @xyz lead somewhere?" there's no technical reason or anything <details><summary>meaningless drama analysis</summary> as far as i'm concerned the issue wasn't *actually* "why should we have @:user", it was more about gleason abusing his powers and adding hacky code to pleroma be to support *specifically* soapbox instead of just . adding it to soapbox. fundamentally i think adding a `@` path is fine, we already have `/users/:user` and `/user` going to the same place in the frontend, as long as it's discussed beforehand (like we're doing just now) </details>

i'm probably missing something, but is there any reason why each frontend can't just handle its own special username paths by handling 404s?

i'm probably missing something, but is there any reason why each frontend can't just handle its own special username paths by handling 404s?
Contributor

@catgirlinspace You can probably do it with nginx, yeah. See https://git.pleroma.social/pleroma/pleroma/-/blob/develop/installation/pleroma.nginx#L84

Afaict, this is only for redirecting posts, though. You probably want more something like

 location ~ ^/@([^/]+)$ {
     proxy_pass http://phoenix/users/$1;
 }

Whether this should be part of Akkoma or not, I'll leave that up to floaty 🤐 My personal opinion is that more routes means more chance for bugs and collisions with the rest of the API, so shouldn't be added lightly. That doesn't mean I'm opposed to it per sé, but the improvement should be worth the extra potential trouble I think.
On a sidenote; I do prefer /@<username> more than /<username> (which we currently have) because, thanks to the use of the @, it at least doesn't cause direct collisions with the rest of the API.

@catgirlinspace You can probably do it with nginx, yeah. See https://git.pleroma.social/pleroma/pleroma/-/blob/develop/installation/pleroma.nginx#L84 Afaict, this is only for redirecting posts, though. You probably want more something like ``` location ~ ^/@([^/]+)$ { proxy_pass http://phoenix/users/$1; } ``` Whether this should be part of Akkoma or not, I'll leave that up to floaty 🤐 My personal opinion is that more routes means more chance for bugs and collisions with the rest of the API, so shouldn't be added lightly. That doesn't mean I'm opposed to it per sé, but the improvement should be worth the extra potential trouble I think. On a sidenote; I do prefer `/@<username>` more than `/<username>` (which we currently have) because, thanks to the use of the `@`, it at least doesn't cause direct collisions with the rest of the API.
Sign in to join this conversation.
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#279
No description provided.