@substrate-system/cookie
    Preparing search index...

    Function createCookie

    • Create a cookie and return it as a string.

      Parameters

      • sessionData: Record<string, string>

        Data to encode with the cookie

      • secretKey: string

        The secret key

      • Optionalname: string

        The name for the cookie; defaults to session

      • Optionalenv: Partial<
            {
                COOKIE_DOMAIN: string;
                COOKIE_HTTPONLY: string;
                COOKIE_MAX_AGE_SPAN: string;
                COOKIE_PATH: string;
                COOKIE_SAMESITE: string;
                COOKIE_SECURE: string;
            },
        >

      Returns Promise<string>

      The cookie as string