-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cors headers not set on static site response #300
Labels
good first issue
Good for newcomers
Comments
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Fastify version
3.29
Plugin version
5.0.2
Node.js version
16
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
ubuntu 20.04
Description
I am using @fastify/cors, @fastify/helmet and @fastify/static on a project. I have set helmet and cors for all endpoints in the project. All other endpoints return response with header:
access-control-allow-origin : https://www.domain.com
but not the response sent from reply.sendFile for static file serve. The headers from helmet are present on the sendFile response
Steps to Reproduce
Expected Behavior
response header should have a header
access-control-allow-origin : https://www.domain.com
The text was updated successfully, but these errors were encountered: