Use relative URL in settings #1082

Merged
prologic merged 1 commits from relative-link-settings into main 6 days ago
Owner

Clicking your own avatar here requires the BASE_URL, and I can't really fathom a reason in particular it should, the image is successfully loaded from a relative URL.

image

Clicking your own avatar here requires the BASE_URL, and I can't really fathom a reason in particular it should, the image is successfully loaded from a relative URL. ![image](/attachments/79d9cacb-d1a4-493b-a9c5-26b0518b0bc8)
ocdtrekkie added 1 commit 2 weeks ago
7bd82a7bdb Use relative URL in settings
ocdtrekkie changed title from WIP: Use relative URL in settings to Use relative URL in settings 2 weeks ago
Poster
Owner

Hmm, so the ones in User Links are still invalid, and that one would be harder to safely fix. It's reasonable to assume all links in your profile settings refer to a local user and can be relative, but that ProfileLinks template is reused elsewhere.

I'm going to punt on fixing those for now, because it's not important and other fixes we look at will hopefully eventually resolve the base_url issue for the purposes of external profile detection, at least.

Hmm, so the ones in User Links are still invalid, and that one would be harder to safely fix. It's reasonable to assume all links in your profile settings refer to a local user and can be relative, but that ProfileLinks template is reused elsewhere. I'm going to punt on fixing those for now, because it's not important and other fixes we look at will hopefully eventually resolve the base_url issue for the purposes of external profile detection, at least.
prologic reviewed 2 weeks ago
<article class="profile-header">
<a id="profile-avatar" href="{{ $.User.URL | trimSuffix "/twtxt.txt" }}" class="u-url">
<a id="profile-avatar" href="/user/{{ $.User.Username }}" class="u-url">
Owner

I think the issue with doing this is you break the ability to run a pod on a sub-atph. If we do this, it must always be deployed on a domain or sub-domain. Right? 🤔

I _think_ the issue with doing this is you break the ability to run a pod on a sub-atph. If we do this, it must always be deployed on a domain or sub-domain. Right? 🤔
Poster
Owner

So I based this on the line immediately following it, which is how the image is loaded inside this link. Is there a situation where this link wouldn't load but the avatar would?

So I based this on the line immediately following it, which is how the image is loaded inside this link. Is there a situation where this link wouldn't load but the avatar would?
Owner

Good catch! 🤣 I guess no-one has really ever tried to run yarnd on a sub-path. See #591 -- So if the stance is we don't support this, then this PR any any others like it should be fine 🤞

Good catch! 🤣 I guess no-one has really ever tried to run `yarnd` on a sub-path. See https://git.mills.io/yarnsocial/yarn/issues/591 -- So if the _stance_ is we don't support this, then this PR any any others like it _should_ be fine 🤞
Poster
Owner

As an additional note, I don't think running applications on subpath is great anyways because of same origin policy stuff.

As an additional note, I don't think running applications on subpath is great anyways because of same origin policy stuff.
prologic marked this conversation as resolved
prologic approved these changes 6 days ago
prologic merged commit 9c45c1176e into main 6 days ago
prologic deleted branch relative-link-settings 6 days ago

Reviewers

prologic approved these changes 6 days ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 9c45c1176e.
Sign in to join this conversation.
Loading…
There is no content yet.