Created
September 21, 2021 07:05
-
-
Save jlandure/716841e6c9c0d3449ec229d179ba8e65 to your computer and use it in GitHub Desktop.
http to https client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
typeof window !== "undefined" | |
&& window?.location?.protocol === "http:" | |
&& window?.location?.hostname !== "localhost" | |
) { | |
window.location.protocol = "https:" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment