Open revog opened 3 years ago
I did some further tests and found out that this "unauthorized" error occurs when I set the basic authentication wihtin the HTTP GET request. And it seems that it does not matter whether its value is empty or not.
It seems a code change is needed, which does not add any authentication parameters to a request if username & password is not set.
I temporarly removed the following lines from index.js and now the GET method work as expected: https://github.com/staromeste/homebridge-http-advanced-accessory/blob/master/index.js#L135
auth: {
user: this.auth.username,
pass: this.auth.password,
sendImmediately: this.auth.immediately
},
headers: {
Authorization: "Basic " + new Buffer(this.auth.username + ":" + this.auth.password).toString("base64")
}
Anybody here who's able to fix this in an elegant way?
Why do I get "Unauthorized" message when accessing simple URL which returns a JSON?
When I do a curl on Homebridge server it works without any authentication information:
Un-obfuscated URL is definitely unprotected and does also work when accessing in browser. What does this plugin do different?
Regards