Near the top under the previous use statements you need to add
use App\Middleware\httpOptionsMiddleware;
]]>This fix is a work of pure genius.
To install:
mkdir src/Middleware
create a new file named src/Middleware/httpOptionsMiddleware.php and put the contents of the above into it
Open src/Application.php and append the new hook for the middleware
// Add routing middleware.
->add(new RoutingMiddleware($this))
// add http options
->add( new HttpOptionsMiddleware($this))