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

why not allow same hostname? #96

Open
x94fujo6rpg opened this issue Sep 7, 2022 · 3 comments
Open

why not allow same hostname? #96

x94fujo6rpg opened this issue Sep 7, 2022 · 3 comments

Comments

@x94fujo6rpg
Copy link

x94fujo6rpg commented Sep 7, 2022

if anyone want to use this in your own repo (github page).
unless you are using other domain.
otherwise your hostname will always be [your_github_name].github.io

not sure what is this check for

url.hostname === location.hostname;

in my case (github page)
this check will always be true => isInvalidUrl => redirect failed

fix:

url.hostname !== location.hostname;

*just thought about this, do this so people can't use it on sites besides your repo

@NoPlagiarism
Copy link

It used to escape redirect chains. Maybe there some way to do it better, but it is how it is now

@nelsontky
Copy link
Owner

It used to escape redirect chains. Maybe there some way to do it better, but it is how it is now

Yup that's correct, that's the reason why! I'll take a look into it another time and leave this open!

@NullyIsHere
Copy link

Checking if the hostname includes nlsn.cf. idk
Buuuut. If its a custom domain the hostname is nlsn.cf not nelsontky.github.io.
I Think.
Bye

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

4 participants