-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support HTTP headers with CORS-method #2957
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
Support HTTP headers with CORS-method #2957
Conversation
A separate file makes it easier to test. Added unit tests to the cors-method.
|
The tests fail because GitHub uses a different node-version. GitHub uses 16.17.1, whilst I used 19.0.0 locally. Will try to implement the tests to run on both. |
we are running the tests here on 3 node version, 14+16+18. Our fetch function uses the internal fetch of Node if Node version >=18 and |
Codecov Report
@@ Coverage Diff @@
## develop #2957 +/- ##
===========================================
- Coverage 65.28% 63.72% -1.57%
===========================================
Files 14 15 +1
Lines 726 758 +32
===========================================
+ Hits 474 483 +9
- Misses 252 275 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Yep, working now 👍 |
rejas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small things only
This is required for some weather-providers, and will probably be useful for other services.
rejas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds support for sending and receiving HTTP-headers when using the CORS-method.
This change is required for the Yr weather-provider introduced in #2948.
To make it easier to add unit tests I moved the server-functions into a separate file.