MCPcopy Index your code
hub / github.com/browserless/browserless / onHTTPUnauthorized

Method onHTTPUnauthorized

src/server.ts:103–109  ·  view source on GitHub ↗
(_req: Request, res: Response)

Source from the content-addressed store, hash-verified

101 }
102
103 protected onHTTPUnauthorized(_req: Request, res: Response) {
104 this.logger.error(
105 `HTTP request is not properly authorized, responding with 401`,
106 );
107 this.metrics.addUnauthorized();
108 return writeResponse(res, 401, 'Bad or missing authentication.');
109 }
110
111 protected onWebsocketUnauthorized(_req: Request, socket: stream.Duplex) {
112 this.logger.error(

Callers 1

handleRequestUnsafeMethod · 0.95

Calls 3

writeResponseFunction · 0.85
errorMethod · 0.80
addUnauthorizedMethod · 0.80

Tested by

no test coverage detected