Skip to content

Conversation

@gnpaone
Copy link

@gnpaone gnpaone commented May 16, 2025

No description provided.

@gnpaone
Copy link
Author

gnpaone commented May 16, 2025

I've had an issue where when used ipv6 address the uri stays undefined, works fine for ipv4.
getzola/zola#2854

So need to modify few lines in livereload-js

@smhg
Copy link
Contributor

smhg commented May 16, 2025

Thank you!
This doesn't seem like the right place to access the window global. It makes the test fail too.
Also, aren't you able to pass the host value in the format you want through options.host?

@gnpaone
Copy link
Author

gnpaone commented May 16, 2025

When I'm using ipv6:

this.options:

{
    "https": false,
    "port": 1024,
    "snipver": null,
    "ext": null,
    "extver": null,
    "mindelay": 10,
    "maxdelay": 60000,
    "handshake_timeout": 5000
}

this.options.host is undefined. `window.location.hostname worked fine and browser could connect to ws successfully

@smhg
Copy link
Contributor

smhg commented May 16, 2025

And it does work when you specify a host value in one of the options?

@gnpaone
Copy link
Author

gnpaone commented May 16, 2025

Yes it works when specified

@smhg
Copy link
Contributor

smhg commented May 16, 2025

But the current host should be detected, right?
FWIW: there is a test with ipv6 which shows how it should work.
Please feel free to resubmit a PR with a failing test case to show what doesn't work.

@smhg smhg closed this May 16, 2025
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

Successfully merging this pull request may close these issues.

2 participants