How do I disable HTTPS on Heroku

后端 未结 2 1272
小鲜肉
小鲜肉 2021-02-07 03:43

I created a site and put it on Heroku. I then added a custom domain (e.g. \"site.example.com\") in the Heroku control panel and I pointed the DNS to my Heroku address. This work

2条回答
  •  囚心锁ツ
    2021-02-07 04:23

    This may not be the best practice but nevertheless if you desperately want to force "NO-SSL", then you may do it via JavaScript code as follows.

     window.onload=function(){
         $(function(){
             if(window.location.protocol==="https:")
                 window.location.protocol="http";
         });
     }
    

提交回复
热议问题