Skip to content

Cors example: TypeError: Cannot read properties of undefined (reading 'set') #202

@0xmovses

Description

@0xmovses

I have added the cors.ts file to our project and added the middleware function to use cors, however when I run yarn dev I the following error

TypeError: Cannot read properties of undefined (reading 'set')

The error comes from the cors function inside cors.ts. We have not modified the code.

We are on NextJS 12.1.0. Any help here is apprecaited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions