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

Should external catcher relax on scheme change? #1058

Open
rgaudin opened this issue Feb 21, 2024 · 3 comments
Open

Should external catcher relax on scheme change? #1058

rgaudin opened this issue Feb 21, 2024 · 3 comments

Comments

@rgaudin
Copy link
Member

rgaudin commented Feb 21, 2024

I noticed that in an HTTP zimit1 scenario, when accessing the ZIM, warc2zim offers to switch to HTTPs in order to allow Service Workers.

Screenshot 2024-02-21 at 15 06 02

When clicking this link, I get the external catcher

Screenshot 2024-02-21 at 15 06 28

As a user, I was surprised by this because it didn't feel like I was going online (and I wasn't).

I wonder if we should relax our isExternalUrl() check to allow identical URLs but on a different scheme 🤔

function isExternalUrl(url) {
if ( url.startsWith(window.location.origin) )
return false;
return url.startsWith("//")
|| url.startsWith("http:")
|| url.startsWith("https:");
}

@kelson42
Copy link
Collaborator

This is a bug IMO.

@mgautierfr
Copy link
Member

Seems indeed something to do. Especially we are redirecting our user to a https url.


But for the record, cross-origin differentiate between http and https.
I don't think it is important here, but somehow related and good to remember.

@kelson42
Copy link
Collaborator

Not sure here how would look like the next step?

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

No branches or pull requests

3 participants