Harden Nitro runtime and health handling
This commit is contained in:
1 parent
f377424d3a
commit
0cf29e0e06
3 files changed
+5
No files matched your search
@@ -3,6 +3,9 @@ import { fileURLToPath } from "node:url"
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: "2025-07-15",
|
||||
nitro: {
|
||||
preset: "node-server",
|
||||
},
|
||||
devtools: { enabled: true },
|
||||
runtimeConfig: {
|
||||
// Private server configuration. Matching NUXT_* variables override these
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export default defineEventHandler(() => ({ status: "ok" }))
|
||||
@@ -94,5 +94,6 @@ export default defineEventHandler(async (event) => {
|
||||
}
|
||||
|
||||
if (event.node.req.method === "HEAD") return null
|
||||
if (metadata.size === 0) return null
|
||||
return sendStream(event, createReadStream(file.path, { start, end }))
|
||||
})
|
||||
Reference in new issue
Block a user