PHP 8.2.30
Preview: init.js Size: 853 B
/home/byroehnu/easepaybiz.easetack.com/node_modules/express/lib/middleware/init.js

/*!
 * express
 * Copyright(c) 2009-2013 TJ Holowaychuk
 * Copyright(c) 2013 Roman Shtylman
 * Copyright(c) 2014-2015 Douglas Christopher Wilson
 * MIT Licensed
 */

'use strict';

/**
 * Module dependencies.
 * @private
 */

var setPrototypeOf = require('setprototypeof')

/**
 * Initialization middleware, exposing the
 * request and response to each other, as well
 * as defaulting the X-Powered-By header field.
 *
 * @param {Function} app
 * @return {Function}
 * @api private
 */

exports.init = function(app){
  return function expressInit(req, res, next){
    if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
    req.res = res;
    res.req = req;
    req.next = next;

    setPrototypeOf(req, app.request)
    setPrototypeOf(res, app.response)

    res.locals = res.locals || Object.create(null);

    next();
  };
};

Directory Contents

Dirs: 0 × Files: 3

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:06
Edit Download
853 B lrw-r--r-- 2026-03-05 00:20:09
Edit Download
885 B lrw-r--r-- 2026-03-05 00:20:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).