| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function handle(Request $request, Closure $next) |
||
| 25 | { |
||
| 26 | if ('https' == $request->server('HTTP_X_FORWARDED_PROTO')) { |
||
| 27 | $request->server->set('HTTPS', 'on'); |
||
| 28 | } |
||
| 29 | |||
| 30 | if (! $request->secure() && 'production' === env('APP_ENV')) { |
||
| 31 | return Redirect::secure($request->getRequestUri()); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $next($request); |
||
| 35 | } |
||
| 37 |