Interface Context

Context that used for render server entry point for development It needs a production implementation for your environment. The context will go to the created hook parameters of the plugin

interface Context {
    cookies: Record<string, any>;
    headers: Record<string, any>;
    hostname: string;
    ip: string;
    memcache: null | number;
    protocol: string;
    responseHeaders: Record<string, any>;
    statusCode: number;
    url: string;
}

Properties

cookies: Record<string, any>

this property is an object that contains cookies sent by the request

headers: Record<string, any>

Request headers

hostname: string

hostname (example.com) as express req.hostname

ip: string

remote address (127.0.0.1)

memcache: null | number

special property for usin memcached

protocol: string

protocol (http) as express req.protocol

responseHeaders: Record<string, any>

Response headers

statusCode: number

response status code default 200

url: string

string current url /search?q=something

Generated using TypeDoc