Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HTTPServerOptions

表示 HTTP 服务器的附加选项

Hierarchy

  • SecureContextOptions & TlsOptions & ServerOptions
  • SecureServerOptions
  • SecureContextOptions & TlsOptions & ServerOptions
  • SecureServerOptions
    • HTTPServerOptions

Index

Properties

Optional ALPNProtocols

ALPNProtocols: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array

Optional Http1IncomingMessage

Http1IncomingMessage: IncomingMessage

Optional Http1ServerResponse

Http1ServerResponse: ServerResponse

Optional Http2ServerRequest

Http2ServerRequest: Http2ServerRequest

Optional Http2ServerResponse

Http2ServerResponse: Http2ServerResponse

Optional IncomingMessage

IncomingMessage: IncomingMessage

Optional NPNProtocols

NPNProtocols: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array

Optional SNICallback

SNICallback: function

Type declaration

    • (servername: string, cb: function): void
    • Parameters

      • servername: string
      • cb: function
          • (err: Error | null, ctx: SecureContext): void
          • Parameters

            • err: Error | null
            • ctx: SecureContext

            Returns void

      Returns void

Optional ServerResponse

ServerResponse: ServerResponse

Optional allowHTTP1

allowHTTP1: boolean

Optional ca

ca: string | Buffer | Array<string | Buffer>

Optional cert

cert: string | Buffer | Array<string | Buffer>

Optional ciphers

ciphers: string

Optional clientCertEngine

clientCertEngine: string

Optional createConnection

createConnection: function

Type declaration

    • (authority: URL, option: SessionOptions): stream.Duplex
    • Parameters

      • authority: URL
      • option: SessionOptions

      Returns stream.Duplex

Optional crl

crl: string | Buffer | Array<string | Buffer>

Optional dhparam

dhparam: string | Buffer

Optional ecdhCurve

ecdhCurve: string

Optional handshakeTimeout

handshakeTimeout: number

Optional honorCipherOrder

honorCipherOrder: boolean

Optional http2

http2: boolean

是否启用 HTTP/2 协议

default

false

Optional https

https: boolean

是否启用加密传输协议

default

false

Optional key

key: string | Buffer | Array<Buffer | Object>

Optional maxAllowedContentLength

maxAllowedContentLength: number

允许请求的最大字节数

default

20 * 1024 * 1024

Optional maxDeflateDynamicTableSize

maxDeflateDynamicTableSize: number

Optional maxHeaderListPairs

maxHeaderListPairs: number

Optional maxOutstandingPings

maxOutstandingPings: number

Optional maxSendHeaderBlockLength

maxSendHeaderBlockLength: number

Optional maxSessionMemory

maxSessionMemory: number

Optional maxVersion

maxVersion: SecureVersion

Optionally set the maximum TLS version to allow. One of 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Cannot be specified along with the secureProtocol option, use one or the other. Default: 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to 'TLSv1.3'. If multiple of the options are provided, the highest maximum is used.

Optional minVersion

minVersion: SecureVersion

Optionally set the minimum TLS version to allow. One of 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Cannot be specified along with the secureProtocol option, use one or the other. It is not recommended to use less than TLSv1.2, but it may be required for interoperability. Default: 'TLSv1.2', unless changed using CLI options. Using --tls-v1.0 sets the default to 'TLSv1'. Using --tls-v1.1 sets the default to 'TLSv1.1'. Using --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.

Optional origins

origins: string[]

Optional paddingStrategy

paddingStrategy: number

Optional passphrase

passphrase: string

Optional peerMaxConcurrentStreams

peerMaxConcurrentStreams: number

Optional pfx

pfx: string | Buffer | Array<string | Buffer | Object>

Optional rejectUnauthorized

rejectUnauthorized: boolean

Optional requestCert

requestCert: boolean

Optional secureOptions

secureOptions: number

Optional secureProtocol

secureProtocol: string

Optional selectPadding

selectPadding: function

Type declaration

    • (frameLen: number, maxFrameLen: number): number
    • Parameters

      • frameLen: number
      • maxFrameLen: number

      Returns number

Optional sessionIdContext

sessionIdContext: string

Optional sessionTimeout

sessionTimeout: number

Optional settings

settings: Settings

Optional ticketKeys

ticketKeys: Buffer

Generated using TypeDoc