Options
All
  • Public
  • Public/Protected
  • All
Menu

Module sessionInMemory

import {sessionInMemory} from 'u-http-server';
// or
import sessionInMemory from 'u-http-server/middlewares/sessions.js';

based on ctx.cookies['SID'] fetch session or create a new one renew Set-Cookie header in response place session in ctx.session

Callable

  • sessionInMemory(ctx: Context): Promise<void>
  • import {sessionInMemory} from 'u-http-server';
    // or
    import sessionInMemory from 'u-http-server/middlewares/sessions.js';

    based on ctx.cookies['SID'] fetch session or create a new one renew Set-Cookie header in response place session in ctx.session

    Parameters

    Returns Promise<void>

Generated using TypeDoc