Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Письменов Дмитрий Иванович / yourroomads

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • yourroomads
  • app
  • Http
  • Middleware
  • ConvertRedirects.php
  • Jonathan Reinink's avatar
    Initial work adding support for non-GET Inertia visits · fbdaf9b6
    Jonathan Reinink committed Apr 15, 2019
    fbdaf9b6 Browse Files
ConvertRedirects.php 370 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?php

namespace App\Http\Middleware;

use Closure;
use Symfony\Component\HttpFoundation\RedirectResponse;

class ConvertRedirects
{
    public function handle($request, Closure $next)
    {
        $response = $next($request);

        if ($response instanceof RedirectResponse) {
            $response->setStatusCode(303);
        }

        return $response;
    }
}