fix: Automatically prepend https for Overseerr, Sonarr and Radarr when using port 443 #853
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This took me way too long to figure out. Hence this PR to fix this for future me (And everyone else).
Because the fields are labeled as Hostname / IP it wasn't clear you could enter https://hostname in that field (Which technically is a URL, not a hostname).
So I put my hostname and port 443 in the settings, but every time I clicked test it failed.
It wasn't untill I refreshed the page it became clear the hostname was prepended with http:// by default.
This PR fixes this by prepending the hostname with https when using port 443, or http if not.
The includes checks could be combined into one (https always contains http, so no need to check twice), and I've added a condition for port 443.
(First PR here, please let me know if anything is missing)