@ozmap/logger
Version:
DevOZ logger module.
23 lines (22 loc) • 941 B
TypeScript
/// <reference types="node" />
import { IncomingHttpHeaders, Server } from 'http';
import { Logger } from '../Logger';
/**
* Function to create HTTP server on the primary process.
*
* @param port The interface port for the server to listen on.
* @param address The interface address for the server to listen on.
* @param logger The logger instance.
* @returns The HTTP server that was setup.
*/
export declare function setupLogServer(port: number, address: string, logger: Logger): Server | void;
/**
* Function for checking if HTTP header
* is present and has the given value.
*
* @param headers The HTTP request headers.
* @param header The HTTP header being checked.
* @param value The HTTP header value being verified.
* @returns If the header is present and has the given value.
*/
export declare function checkRequestHeader(headers: IncomingHttpHeaders, header: string, value: string): boolean;