HttpsProtocol.php 287 B

1234567891011121314151617
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Closure;
  4. class HttpsProtocol {
  5. public function handle($request, Closure $next)
  6. {
  7. if (@$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
  8. \URL::forceScheme('https');
  9. }
  10. return $next($request);
  11. }
  12. }