UNPKG

@devcycle/nextjs-sdk

Version:

The Next.js SDK for DevCycle!

18 lines 566 B
'use server'; import { cookies } from 'next/headers'; import { debugUserCookieName } from '../cookie'; /** * Clear the debug user cookie. This is called from the client side * to clear the cookie on page refresh. */ export const clearDebugUserCookie = async () => { const cookieStore = await cookies(); cookieStore.set(debugUserCookieName, '', { httpOnly: true, secure: process.env.NODE_ENV === 'production', sameSite: 'strict', path: '/', expires: new Date(0), }); }; //# sourceMappingURL=clearDebugUser.js.map