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

API only accessable via localhost:port #28

Open
sualfred opened this issue Dec 23, 2018 · 4 comments
Open

API only accessable via localhost:port #28

sualfred opened this issue Dec 23, 2018 · 4 comments

Comments

@sualfred
Copy link

sualfred commented Dec 23, 2018

I want to add Hyperion in some home automation integration to start/stop the capturing. This could easily be done via the HTTP commands, but I only can access them on the device which is running the screen capture application and by using "localhost".

works:
localhost:port/API?command=STATE

doesn't work:
127.0.0.1:port/API?command=STATE
192.168.2.245:port/API?command=STATE

Could you please take a look into this? Thanks.

@perebusquets
Copy link

Hi, I'm having the same issue, the problem is probably that the hostname of the server is set as localhost. This means it only grabs responds if the incoming request URL is also localhost.

I believe the way to fix this would be to change it to 0.0.0.0 in the code, which means it the request URL doesn't matter (it accepts all of them) or allowing users to set their own hostname.

I don't have the tooling installed so I can't check if it works and submit a PR...

@sabaatworld
Copy link
Owner

I can make the change in early Jan since I'm currently travelling.

@sabaatworld
Copy link
Owner

I've released a new version today which should fix the issue. Let me know if it works for you.

@perebusquets
Copy link

Sorry I was busy and couldn't check it until now, it still doesn't work if the request comes from another device.
I've checked that I can do a request on another HTTP server on the same machine, so I'm sure it isn't something network related

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

3 participants