You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.21.0
Plugin version
Tested on 9.0.0, 9.0.1 and 9.0.2
Node.js version
18.17.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian 11
Description
After new version 9.x.x, fastify-cookie plugin is causing cors errors only when headers are added to request and it does not happen in previous versions. Before 9.x.x version, everything was working properly.
When I add headers to request, the fastify server returns cors error
Access to fetch at 'https://api.mydomain.com/users' from origin 'https://app.mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
If I remove headers or remove fastify-cookie plugin, it works properly. It only happens on new 9.x.x version of fastify-cookie plugin
Prerequisites
Fastify version
4.21.0
Plugin version
Tested on 9.0.0, 9.0.1 and 9.0.2
Node.js version
18.17.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian 11
Description
After new version 9.x.x, fastify-cookie plugin is causing cors errors only when headers are added to request and it does not happen in previous versions. Before 9.x.x version, everything was working properly.
When I add headers to request, the fastify server returns cors error
Access to fetch at 'https://api.mydomain.com/users' from origin 'https://app.mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
If I remove headers or remove fastify-cookie plugin, it works properly. It only happens on new 9.x.x version of fastify-cookie plugin
Steps to Reproduce
API Server:
Client Side Fetch Request:
Expected Behavior
I expect everything work properly as it was working on previous versions
The text was updated successfully, but these errors were encountered: