Bad typings for Fastify server enableCors
method, delegator
property is missing
#13234
Closed
3 of 15 tasks
Labels
needs triage
This issue has not been looked into
Is there an existing issue for this?
Current behavior
When passing
delegator
property toenableCors
method (according to@fastify/cors
documentation), it issues:It is needed to access the whole request object. Using
cors
property or pass function (CorsOptionsDelegate<T>
) allows to access onlyorigin
string property and wholefastify
object, but not the request itself.Minimum reproduction code
https://github.com
Steps to reproduce
Expected behavior
Code provided in "Steps to reproduce" should not issues an TS error.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.3.1
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: