refactor: cacheControl

pull/21/merge
xiaojunnuo 2023-07-03 17:43:21 +08:00
parent 0317118cd9
commit 05f74ab654
2 changed files with 2 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import { PipelineEntity } from '../modules/pipeline/entity/pipeline';
//import { logger } from '../utils/logger';
// load .env file in process.cwd
import { mergeConfig } from './loader';
const development = {
keys: '',
koa: {
@ -15,7 +16,7 @@ const development = {
staticFile: {
usePrecompiledGzip: true,
buffer: true,
maxAge: 0,
cacheControl: 'maxAge=' + 30 * 24 * 60 * 60 * 1000,
gzip: true,
dirs: {
default: {

View File

@ -16,7 +16,6 @@ import { AuthorityMiddleware } from './middleware/authority';
import * as staticFile from '@midwayjs/static-file';
import * as cron from './plugins/cron';
import { logger } from './utils/logger';
@Configuration({
imports: [koa, orm, cache, flyway, validateComp, cron, staticFile],
importConfigs: [