Keep library deletes when a still file is locked, and match LoRAs by engine folder.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-10-24 11:13:00 -05:00
co-authored by Cursor
parent 8602d6ed2e
commit 39aa4b65d0
19 changed files with 501 additions and 116 deletions
+12
View File
@@ -0,0 +1,12 @@
/** Cache headers for generate/prompt routes. Case-sensitive; not nitro routeRules. */
export default defineEventHandler((event) => {
const path = getRequestURL(event).pathname
if (path.startsWith('/api/generate/')) {
setHeader(event, 'Cache-Control', 'no-cache, no-store, no-transform')
setHeader(event, 'X-Accel-Buffering', 'no')
return
}
if (path.startsWith('/api/prompt/')) {
setHeader(event, 'Cache-Control', 'no-cache, no-store, no-transform')
}
})