Apollo-server-fastify CORS headers not being set

Hi - I am following the recipe from here (https://www.apollographql.com/docs/apollo-server/integrations/middleware/#apollo-server-fastify) to create a GraphQL server with fastify and apolloServer. The only line i’ve changed is below - to grant full access to CORS for every client. However, when i try to hit this endpoint, I get an error no matter what i do. Is there another way i should be adding CORS options? Thanks!

  app.register(
    apolloServer.createHandler({
      cors: {
        origin: true,
      },
    })
  );

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.