Cors is gone..? reverting old changes
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 5s

This commit is contained in:
2025-05-01 21:05:40 -04:00
parent 3aeec4d23e
commit 1d183c37f8
3 changed files with 15 additions and 14 deletions

View File

@@ -19,7 +19,7 @@ interface User {
resetTokenExpiresAt: Date | null
}
export const handleTusUpload = async (
export const handleTusUpload = (
req: FastifyRequest,
res: FastifyReply,
tusHandler: Server,
@@ -28,7 +28,7 @@ export const handleTusUpload = async (
if (isProduction) {
if (req.method === 'OPTIONS') handleOptionsRequest(res)
else if (isPublicEndpoint && req.method === 'GET')
await tusHandler.handle(req.raw, res.raw)
tusHandler.handle(req.raw, res.raw)
else if (['GET', 'POST', 'HEAD', 'PATCH'].includes(req.method)) {
if (req.headers.cookie) handleAuthenticatedRequest(req, res, tusHandler)
else {
@@ -41,7 +41,7 @@ export const handleTusUpload = async (
}
} else {
setCorsHeaders(res)
await tusHandler.handle(req.raw, res.raw)
tusHandler.handle(req.raw, res.raw)
}
}