Comments (12)
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
from fastify-cors.
Could you please specify the version of fastify-cors
you're using?
Also please provide the request headers.
I cannot reproduce using:
fastify 3.15.0
fastify-cors 5.2.0
from fastify-cors.
Could you please specify the version of
fastify-cors
you're using?
Also please provide the request headers.I cannot reproduce using:
fastify 3.15.0 fastify-cors 5.2.0
It occurred while using v5.2.0, I'll try once again and try to identify the issue! :)
from fastify-cors.
@zyrouge do you have a public repo where this is occurring that you are able to share?
from fastify-cors.
@zyrouge do you have a public repo where this is occurring that you are able to share?
Wish i could but its private :(
from fastify-cors.
I reproduced it, check https://github.com/zyrouge/fastify-cors/tree/header-false for the code.
from fastify-cors.
Assuming that the false
value comes from
Line 194 in 1385db3
false
value and throws up a warning. According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin null
value can be used but is not preferred, as a response with no header will be the solution?from fastify-cors.
false
value means that the request is not allowed. Also you're not sharing the request headers
, there is no way to reproduce it properly.
from fastify-cors.
false
value means that the request is not allowed. Also you're not sharing the requestheaders
, there is no way to reproduce it properly.
I did some research and found that the cors header should only have a value of *
or an origin. I don't think false
is the appropriate value to be set. It still does the job but it would be nice if there is a solution to get rid of warnings displayed in the browser when using it. I'll make sure to share the request headers. :)
from fastify-cors.
This need to be adressed in another issue.
Is your issue solved?
from fastify-cors.
This need to be adressed in another issue.
Is your issue solved?
Fix for #127 would solve this.
from fastify-cors.
Fixed in v6.0.0
from fastify-cors.
Related Issues (20)
- Lack of support with Fastify 4.x HOT 4
- doesnt' work with Typescript HOT 1
- Origin returns undefined HOT 14
- Latency when using a large JWT token HOT 7
- UnhandledPromiseRejectionWarning: AvvioError: Plugin must be a function or a promise HOT 1
- Allow the special `*` value in `array` in `origin` option HOT 3
- Setting for `Cache-Control` to allow preflight requests to be cached in CDNs HOT 1
- Error(s) in doc. HOT 1
- cacheControl default value is missing HOT 1
- Access-Control-Allow-Origin is not working when streaming the data HOT 6
- AvvioError [Error]: Plugin did not start in time: '[object Promise]' HOT 2
- Support Private Network CORS HOT 8
- Options Request Returns 404 running in bun HOT 1
- Missing type declaration file for β@fastify/corsβ module HOT 2
- preflight 404 on prefixed index routes in nested/scopted cors setups
- Multiple @fastify/cors HOT 2
- Do not always define `Vary` header HOT 1
- `preHandler` called twice when rejecting CORS HOT 5
- Vary with dynamic config
- Credentials header is added regardless of origin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastify-cors.