CorsBuilder + Middleware help

I’m new to building Middleware and using CorsBuilder. I am needing to allow all origins for certain routes in my API. I have built a middleware to be applied on those routes. I’ve stepped through this with xdebug and the Middleware is executing but I don’t see any headers being added :confused:

Running CakePHP 4.4

    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
        $response = $handler->handle($request);
        if (
            !$request instanceof ServerRequest ||
            !$response instanceof Response ||
        ) {
            return $response;

        $response = $response->cors($request)

        return $response;


$routes->scope('/api', function (RouteBuilder $builder) {


$routes->registerMiddleware('cors', new CorsMiddleware([
    'skip' => [
            'controller' => 'Swagger'
            'controller' => 'Auth',
            'action' => 'auth',

There is no problem here. The problem is I didn’t know how to send a proper request, it must include an origin request header to execute.