Last active
October 3, 2019 19:25
-
-
Save Nukeer/d4d0580878008527527578d7c7b712ad to your computer and use it in GitHub Desktop.
Redirect http to https
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
import { environment } from 'src/environments/environment'; | |
if (environment.production) { | |
if (location.protocol === 'http:') { | |
location.href = location.href.replace('http', 'https'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment