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

Not being redirected to create new bookmark #151

Open
iambijayd opened this issue Oct 16, 2023 · 2 comments
Open

Not being redirected to create new bookmark #151

iambijayd opened this issue Oct 16, 2023 · 2 comments

Comments

@iambijayd
Copy link
Contributor

It looks like there's a bug when creating a new bookmark using the provided js function. My server was running properly, but it's not getting redirected to create bookmark page as expected.

GIF showing the issue

ezgif com-video-to-gif(5)

My env file

Screenshot 2023-10-16 200207

@ckolderup
Copy link
Owner

Thanks for reporting! I think there are two issues here:

the PUBLIC_BASE_URL needs to not have the http:// in front of it-- maybe the documentation should be more clear about that? We use the value in many places in the code where we're not generating links (related to ActivityPub stuff), so we add the HTTP protocol handler in front of the value only when we're doing that.

However... in this case, the code used to generate the bookmarklet is hardcoded to 'https', which isn't going to work for localhost URLs in this particular case. Elsewhere, if we're just generating links from page to page on the site, a // prefix would work because it will just inherit whatever protocol the page the link is on is already using. But in this case it's the bookmarklet running the embedded JS. I'm not sure how we can elegantly have all the information we need in this scenario–maybe we need an HTTP_ONLY env var that defaults to false?

@iambijayd
Copy link
Contributor Author

The hardcoded 'https' is pain when developing/using on localhost.

I'm not sure how we can elegantly have all the information we need in this scenario–maybe we need an HTTP_ONLY env var that defaults to false?

could be the solution

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

2 participants