How to use the conf/conf.domain function in conf

To help you get started, we’ve selected a few conf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github misterfresh / react-without-webpack / middleware / auth / auth-middleware.js View on Github external
return stackTokenCalls(req, ip).spread((user, token) => {

    let options = Object.assign(
      {},
      {
        maxAge: conf.maxAge,
        path: conf.path
      },
      conf.domain && {
        domain: conf.domain
      },
      conf.secure && {
        secure: conf.secure
      },
      conf.httpOnly && {
        httpOnly: conf.httpOnly
      }
    )

    if (token) {
      res.cookie(`${conf.name}_token`, token, options)
    }
    req.user = user.data
    req.token = token
    return next()
  })
github misterfresh / react-without-webpack / middleware / auth / auth-middleware.js View on Github external
return stackTokenCalls(req, ip).spread((user, token) => {

    let options = Object.assign(
      {},
      {
        maxAge: conf.maxAge,
        path: conf.path
      },
      conf.domain && {
        domain: conf.domain
      },
      conf.secure && {
        secure: conf.secure
      },
      conf.httpOnly && {
        httpOnly: conf.httpOnly
      }
    )

    if (token) {
      res.cookie(`${conf.name}_token`, token, options)
    }
    req.user = user.data
    req.token = token
    return next()