Support HTTP headers with CORS-method#2957
Support HTTP headers with CORS-method#2957rejas merged 5 commits intoMagicMirrorOrg:developfrom MagMar94:feature/support-http-headers-with-cors
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 👍 |
This is required for some weather-providers, and will probably be useful for other services.
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.