Closed zimozy closed 5 years ago
I couldn't perform redirects: return $response->withRedirect('/page'); I'd get a blank page with an HTTP 200 status code.
return $response->withRedirect('/page');
I was able to fix this on my machine by changing $next($request,$response); to $response = $next($request,$response);
$next($request,$response);
$response = $next($request,$response);
(Since the Response is immutable as per the user guide.)
Thanks @zimozy for finding this. I bumped into the same issue. @christianklisch, is this still something you want to maintain? Middleware under Slim 3 requires the solution that @zimozy suggested.
I couldn't perform redirects:
return $response->withRedirect('/page');
I'd get a blank page with an HTTP 200 status code.I was able to fix this on my machine by changing
$next($request,$response);
to$response = $next($request,$response);
(Since the Response is immutable as per the user guide.)