Commit fb39efab authored by Fabrizio Ruggeri's avatar Fabrizio Ruggeri
Browse files

Updated typesript + some cleaning

parent ed77bbc6
......@@ -7512,9 +7512,9 @@
}
},
"typescript": {
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz",
"integrity": "sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==",
"dev": true
},
"union-value": {
......
......@@ -2,7 +2,7 @@ import type { Config } from '../config/default';
import { tryEach } from '../utils/flow';
import webImageLoader from '../basePlugins/webImageLoader';
import { Logger } from 'pino';
import { AugmentedRequestHandler, ServerRequest, options } from 'microrouter';
import { AugmentedRequestHandler, ServerRequest } from 'microrouter';
import domainWhitelistFactory from '../basePlugins/domainWhitelist';
import flatten from 'lodash/flatten';
......
import { Config } from '../config/default';
import sharp from 'sharp';
import { ServerRequest, ServerResponse } from 'microrouter';
import { send } from 'micro';
import { CacheArtifact, CacheArtifactType } from '../persistors';
import { PipelineResult } from '../pipeline';
import compressor from './compressor';
......@@ -43,7 +42,7 @@ const senderCreator = (config: Config) => {
switch (resource.type || 'buffer') {
case 'buffer': {
if (!skipCache && cacheControlHeader) {
res.setHeader('cache-control', cacheControlHeader);
res.setHeader('Cache-Control', cacheControlHeader);
}
res.setHeader('Content-Type', await getMimeType(resource));
return send(res, 200, resource.data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment