(buf: Buffer, maxAge: number)
| 31 | } |
| 32 | |
| 33 | const createIcon = (buf: Buffer, maxAge: number): FaviconBody => ({ |
| 34 | body: buf, |
| 35 | headers: { |
| 36 | 'Cache-Control': 'public, max-age=' + Math.floor(maxAge / 1000), |
| 37 | ETag: eTag(buf) |
| 38 | } |
| 39 | }) |
| 40 | |
| 41 | function createIsDirError(path: string) { |
| 42 | const error: NodeJS.ErrnoException = new Error(`EISDIR, illegal operation on directory '${path}' `) |