@libp2p/http
    Preparing search index...

    Interface OptionallyAuthenticatedWebSocketOptions

    interface OptionallyAuthenticatedWebSocketOptions {
        fallback?: OptionallyAuthenticatedHTTPRequestHandler;
        maxMessageSize?: number;
        requireAuth: false;
        tokenTTL?: number;
        verifyHostname(hostname: string): boolean | Promise<boolean>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    If the request was not a WebSocket request, invoke this method

    maxMessageSize?: number

    The maximum message size to be sent or received over the socket in bytes

    10_485_760
    
    requireAuth: false

    If true the request will be rejected if the client does not supply an Authorization header, pass false here to attempt to verify the client but allow the request to proceed if it fails

    true
    
    tokenTTL?: number

    How long in ms an auth token for a server will be valid for, defaults to one hour

    360_000
    

    Methods