Skip to content

Commit 649069d

Browse files
committed
Fix regression not allowing CORS PUT requests
This regressed with @fastify/cors v11 73a7c3b https://github.com/fastify/fastify-cors/releases/tag/v11.0.0
1 parent d37dd5e commit 649069d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/config/config.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ export const makeConfig = (env: EnvironmentService) =>
248248
return {
249249
origin,
250250
credentials: true,
251+
// Add POST (+ defaults) to allow local file uploads
252+
methods: ['GET', 'HEAD', 'POST', 'PUT'],
251253
} satisfies CorsOptions;
252254
})();
253255

0 commit comments

Comments
 (0)