douhui4831 2014-10-20 07:44
浏览 33
已采纳

通过HTTPS登录路由的方法是否正确?

More of a thinking out loud than a question. I have set my named routes in my route.php file like

Route::get('user/login', array('uses' => 'UserController@login','as' => 'user.login'));
Route::post('user/postlogin', array('https','uses' => 'UserController@postlogin','as' => 'user.postlogin'));

The first route returns a view with a simple login form. The second route is responsible for checking user credentials and redirects to intended routes.
In terms of security do I have to serve over https user/login route also? As a user I am used to see the switch from http to https when accessing login page and I will be really cautious if it wasn't present. However in my app structure user credentials are sent over https through user/postlogin route. Isn't that correct? Am I missing something? I could add https for user/login also but does it really make a difference? Thank you in advance

  • 写回答

1条回答 默认 最新

  • douping1825 2014-10-20 08:58
    关注

    You don't want the form being intercepted and changed on route to the user, so you need to secure it.

    These days, CPU power is not a significantly limiting factor for SSL. Just use SSL for the entire site. Set up the HTTP virtual host to do nothing except redirect to the SSL.

    You'll increase your security, benefit your users' privacy, and enhance your SEO.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决