Conversation
|
What's the use case? Can you change the port the fritzbox is using? 🤔 |
|
You can change the port when using the remote acces via myfritz (see this feature request) |
| if host.startswith("https://") or host.startswith("http://"): | ||
| self.base_url = f"{host}:{port}" if port else host | ||
| else: | ||
| self.base_url = f"http://{host}:{port}" if port else f"http://{host}" |
There was a problem hiding this comment.
Maybe we should not assume http but https if the port ist 443 here, so we don't get errors if someone enters the port but not the url scheme. I'm unsure how realistic this is 😉.
There was a problem hiding this comment.
Yeah, this logic is just adopted from the get_prefixed_host(), so I didn't want to change the behaviour of the host field now 😬
Interesting. I don't use myfritz, so I didn't know that. Just a small note. Code looks good apart from that. Thank you 👍 . |
This replaces the method get_prefixed_host() by base_url property to allow user defined port