let the user choose wether to use http or https
This commit is contained in:
parent
e6af309f37
commit
d6588a694c
@ -11,12 +11,12 @@ Home Network > Network > Network Settings > Access Settings in the Home Network
|
||||
[x] Transmit status information over UPnP
|
||||
```
|
||||
|
||||
You don't need to provide any credentials.
|
||||
You don't need to provide any credentials. Since that, you should consider using `http` instead of `https` as the requests are significantly faster.
|
||||
|
||||
Allowed fields (limited to a max of 4): `["connectionStatus", "upTime", "maxDown", "maxUp", "down", "up", "received", "sent", "externalIPAddress"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: fritzbox
|
||||
url: https://192.168.178.1
|
||||
url: http://192.168.178.1
|
||||
```
|
||||
|
||||
@ -60,7 +60,8 @@ export default async function fritzboxProxyHandler(req, res) {
|
||||
}
|
||||
|
||||
const serviceWidgetUrl = new URL(serviceWidget.url);
|
||||
const apiBaseUrl = `http://${serviceWidgetUrl.hostname}:49000`;
|
||||
const port = serviceWidgetUrl.protocol === "https:" ? 49443 : 49000;
|
||||
const apiBaseUrl = `${serviceWidgetUrl.protocol}//${serviceWidgetUrl.hostname}:${port}`;
|
||||
|
||||
if (!serviceWidget.fields?.length > 0) {
|
||||
serviceWidget.fields = fritzboxDefaultFields;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user