core&ui: add webauthn support (#484)

Co-authored-by: panda <panda_dtdyy@outlook.com>
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
pandaandundefined authored and GitHub committed 2023-01-23 17:49:40 +08:00
1 parent 3d3a5480e3
commit d069fe127b
29 files changed
+621 -195

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ const DO_NOT_CACHE = ['vditor', '.worker.js', 'fonts', 'i.monaco'];
function shouldCache(name: string, request?: Request) {
if (!name.split('/').pop()) return false;
if (!name.split('/').pop().includes('.')) return false;
if (process.env.NODE_ENV !== 'production' && (name.includes('.hot-update.') || name.includes('?version='))) return false;
// For files download, a response is formatted as string
if (request && request.headers.get('Do-Not-Cache')) return false;
return true;