mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -9,6 +9,7 @@ import { Transformation } from '../types/assets';
|
||||
import storage from '../storage';
|
||||
import { PayloadService, AssetsService } from '../services';
|
||||
import useCollection from '../middleware/use-collection';
|
||||
import env from '../env';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -111,6 +112,7 @@ router.get(
|
||||
res.removeHeader('Content-Disposition');
|
||||
}
|
||||
|
||||
res.setHeader('Cache-Control', env.ASSETS_CACHE_CONTROL);
|
||||
stream.pipe(res);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -44,6 +44,8 @@ const defaults: Record<string, any> = {
|
||||
EMAIL_SENDMAIL_PATH: '/usr/sbin/sendmail',
|
||||
|
||||
TELEMETRY: true,
|
||||
|
||||
ASSETS_CACHE_CONTROL: 'public, max-age=604800',
|
||||
};
|
||||
|
||||
let env: Record<string, any> = {
|
||||
|
||||
Reference in New Issue
Block a user