From 6ac755b478271ecbd18e9ef9c0766cacc4df0f30 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 15 May 2023 22:34:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E7=AB=AF=20html=20?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/loaders/express.ts | 11 +++++++++++ docker/Dockerfile | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/back/loaders/express.ts b/back/loaders/express.ts index 9c32ca56..5235da1c 100644 --- a/back/loaders/express.ts +++ b/back/loaders/express.ts @@ -38,6 +38,17 @@ export default ({ app }: { app: Application }) => { return handler(req, res, { public: path.join(config.rootPath, 'static/dist'), rewrites: [{ source: '**', destination: '/index.html' }], + headers: [ + { + source: 'index.html', + headers: [ + { + key: 'Cache-Control', + value: 'no-cache', + }, + ], + }, + ], }); } }); diff --git a/docker/Dockerfile b/docker/Dockerfile index b160d95b..1e5307fc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -29,7 +29,6 @@ RUN set -x \ && apk upgrade \ && apk --no-cache add -f bash \ coreutils \ - moreutils \ git \ curl \ wget \