【发布时间】:2014-11-17 06:34:09
【问题描述】:
有很多问题询问如何使 Laravel 请求 HTTPS,但如何使它 NON HTTPS。我想确保所有不是订单页面的页面都不是 SSL。基本上与 Redirect::secure 相反。
//in a filter
if( Request::path() != ORDER_PAGE && Request::secure()){
//do the opposite of this:
return Redirect::secure(Request::path());
}
【问题讨论】:
-
这可能会迟到,但它可能会帮助未来的访问者。看看this answer