re #2 Force HTTPS on production when loading home page

* Updated text on home page
This commit is contained in:
Max G 2020-02-10 20:03:14 +00:00
parent de646cf1de
commit 003c7e32b1

View File

@ -105,6 +105,7 @@
<h3 class="subtext"> <h3 class="subtext">
Using an online note application <i class="i cursor icon blinking"></i> Using an online note application <i class="i cursor icon blinking"></i>
</h3> </h3>
<p>Assuming you have never used an note application previously in your life.</p>
<br> <br>
<i class="huge inverted chevron circle down icon"></i> <i class="huge inverted chevron circle down icon"></i>
</div> </div>
@ -292,6 +293,14 @@ export default {
}, },
beforeMount(){ beforeMount(){
//Force HTTPS on prod, always. Dev doesn't have certs
const isDev = process.env['NODE_ENV'] == 'development'
if (!isDev && location.protocol != 'https:'){
window.location.replace('https://www.avidhabit.com')
}
//Don't change hero banner on mobile //Don't change hero banner on mobile
if(!this.$store.getters.getIsUserOnMobile){ if(!this.$store.getters.getIsUserOnMobile){
let windowHeight = window.innerHeight let windowHeight = window.innerHeight