svrjs-nextjs-website/pages/docs/api/proxy-callback.md

1.7 KiB

title
Proxy callback API (module.exports.proxy)

Proxy callback API (module.exports.proxy)

Added in SVR.JS 4.0.0

req

Added in SVR.JS 4.0.0

req object is the same, as req object in Node.JS

socket

Added in SVR.JS 4.0.0

socket object is the same, as socket object in Node.JS

head

Added in SVR.JS 4.0.0

head object is the same, as head object in Node.JS

logFacilities

Added in SVR.JS 4.0.0

See logFacilties in main callback API

config

Added in SVR.JS 4.0.0

See config in main callback API

next()

Added in SVR.JS 4.0.0

See next in main callback API

Global variables (for use in callback APIs)

process.versions.svrjs

Added in SVR.JS 4.0.0

A property containing SVR.JS version.

process.serverConfiguration

Added in SVR.JS 4.0.0

A property containing SVR.JS configuration from config.json file.

process.dirname

Added in SVR.JS 4.0.0

A property containg the SVR.JS installation directory.

process.filename

Added in SVR.JS 4.0.0

A property containg the path to the SVR.JS script.

process.err4xxcounter

Added in SVR.JS 4.0.0

A property containg the count of 4xx HTTP errors.

process.err5xxcounter

Added in SVR.JS 4.0.0

A property containg the count of 5xx HTTP errors.

process.reqcounter

Added in SVR.JS 4.0.0

A property containg the count of HTTP requests.

process.malformedcounter

Added in SVR.JS 4.0.0

A property containg the count of malformed HTTP requests.