- /**
- * @param {http.ClientRequest} req
- * @param {http.ServerResponse} res
- * @param {object} ctx
- */
- async handlerGetStaticFile(req, res, ctx, file) {
- const _scope = _fileScope('handlerGetStaticFile');
- this.logger.debug(_scope, 'called', { req: common.requestLogData(req), ctx, file });
-
- Dingus.setHeadHandler(req, res, ctx);
-
- // Set a default response type to handle any errors; will be re-set to serve actual static content type.
- this.setResponseType(this.responseTypes, req, res, ctx);
-
- await this.serveFile(req, res, ctx, this.staticPath, file || ctx.params.file);
- this.logger.info(_scope, 'finished', { ctx: { ...ctx, responseBody: common.logTruncate((ctx.responseBody || '').toString(), 100) } });
- }
-
-