Initial commit
This commit is contained in:
commit
b105bd7db7
171 changed files with 28322 additions and 0 deletions
17
app/Http/Middleware/HttpsProtocol.php
Normal file
17
app/Http/Middleware/HttpsProtocol.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class HttpsProtocol
|
||||
{
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (!$request->secure() && in_array(App::environment(), ['stage', 'production']))
|
||||
return redirect()->secure($request->getRequestUri());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
Reference in a new issue