mirror of
https://github.com/certd/certd.git
synced 2026-06-29 16:05:15 +08:00
chore: 1
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
export function shouldSetDefaultNoCache(path: string, cacheControl?: string) {
|
||||
if(path === '/' || path === '/index.html' ){
|
||||
//首页不管怎样都不要缓存
|
||||
return true;
|
||||
}
|
||||
if (cacheControl) {
|
||||
return false;
|
||||
}
|
||||
return path === '/' || path === '/index.html' || path.startsWith('/api');
|
||||
// api也不要缓存,如果他本身有设置缓存除外
|
||||
return path.startsWith('/api');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user