mirror of https://github.com/flightphp/core
parent
4f37a4854e
commit
47cd98e78e
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class OverwriteBodyMiddleware
|
||||
{
|
||||
public function after()
|
||||
{
|
||||
$response = Flight::response();
|
||||
$response->write(str_replace('<span style="color:red; font-weight: bold;">failed</span>', '<span style="color:green; font-weight: bold;">successfully works!</span>', $response->getBody()), true);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue