Closed Haider8 closed 4 years ago
I have the same problem,have you fixed it?
Same here, with SimpleWebServer implementation only localhost seems to work, but no access through IP address (e.g. in browser), even on the same device. ERR_CONNECTION_REFUSED error is shown in browser and says "[IP address] refused to connect.". Is this a result of having no CORS settings set (cors = null) or should it work anyway?
Edit: cors set to "http://192.168.43.151" (host device ip address) does not make a difference.
Try setting your server on 0.0.0.0 rather then localhost in your code and check carefully that you enter your mobile's private ip in your browser. This worked for me.
On Thu, Sep 12, 2019, 10:18 AM AndreasGabel notifications@github.com wrote:
Same here, with SimpleWebServer implementation only localhost seems to work, but no access through IP address (e.g. in browser), even on the same device. ERR_CONNECTION_REFUSED error is shown in browser and says "[IP address] refused to connect.". Is this a result of having no CORS settings set (cors = null) or should it work anyway?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NanoHttpd/nanohttpd/issues/556?email_source=notifications&email_token=AKKLEUEEPO4IPFCAAN3VMD3QJHCYVA5CNFSM4ISQOWWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QUOLY#issuecomment-530663215, or mute the thread https://github.com/notifications/unsubscribe-auth/AKKLEUHL2Q7XU6FTMHZAMATQJHCYVANCNFSM4ISQOWWA .
You are right, I just figured it out as well: setting 0.0.0.0 or null as hostname works fine. Thank you anyway.
I have created the android server on my mobile phone and on the same phone I have opened my hotspot. Upon connecting my laptop to my mobile hotspot I can't access that webpage by my mobile's ip address. Please help me how I can do that?
Note: Right now I can only access the webpage on my mobile's localhost.