Skip to content

validateRequest not working when used in middleware #37

@paulgould

Description

@paulgould

I have a need to use validateRequest() from middleware.ts; but it was throwing an error on the caching in export const getCurrentUser = cache(async () => { with Error [ERR_HTTP_HEADERS_SENT]: Cannot append headers after they are sent to the client the fix is to move the function getSessionToken from session.ts to auth.ts. Hope this helps someone!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions