修复后端 html 缓存

This commit is contained in:
whyour
2023-05-15 22:34:06 +08:00
parent e70fa83074
commit 6ac755b478
2 changed files with 11 additions and 1 deletions
+11
View File
@@ -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',
},
],
},
],
});
}
});