react-native-windows 0.68.18 → 0.68.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,10 +10,10 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.68.18</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.68.19</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>68</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>18</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>19</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
18
  </PropertyGroup>
19
19
  </Project>
@@ -640,8 +640,6 @@ void OriginPolicyHttpFilter::ValidateResponse(HttpResponseMessage const &respons
640
640
  }
641
641
 
642
642
  ResponseOperation OriginPolicyHttpFilter::SendPreflightAsync(HttpRequestMessage const &request) const {
643
- // TODO: Inject user agent?
644
-
645
643
  auto coRequest = request;
646
644
 
647
645
  HttpRequestMessage preflightRequest;
@@ -756,6 +754,11 @@ ResponseOperation OriginPolicyHttpFilter::SendRequestAsync(HttpRequestMessage co
756
754
  ValidatePreflightResponse(coRequest, preflightResponse);
757
755
  }
758
756
 
757
+ if (originPolicy == OriginPolicy::SimpleCrossOriginResourceSharing ||
758
+ originPolicy == OriginPolicy::CrossOriginResourceSharing) {
759
+ coRequest.Headers().Insert(L"Origin", s_origin.AbsoluteCanonicalUri());
760
+ }
761
+
759
762
  auto response = co_await m_innerFilter.SendRequestAsync(coRequest);
760
763
 
761
764
  ValidateResponse(response, originPolicy);
@@ -5,6 +5,8 @@
5
5
 
6
6
  #include "RedirectHttpFilter.h"
7
7
 
8
+ // React Native Windows
9
+ #include <CppRuntimeOptions.h>
8
10
  #include "WinRTTypes.h"
9
11
 
10
12
  // Windows API
@@ -211,6 +213,13 @@ ResponseOperation RedirectHttpFilter::SendRequestAsync(HttpRequestMessage const
211
213
  method = coRequest.Method();
212
214
 
213
215
  do {
216
+ // Set User-Agent
217
+ // See https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
218
+ auto userAgent = GetRuntimeOptionString("Http.UserAgent");
219
+ if (userAgent.size() > 0) {
220
+ coRequest.Headers().Append(L"User-Agent", winrt::to_hstring(userAgent));
221
+ }
222
+
214
223
  // Send subsequent requests through the filter that doesn't have the credentials included in the first request
215
224
  response = co_await(redirectCount > 0 ? m_innerFilterWithNoCredentials : m_innerFilter).SendRequestAsync(coRequest);
216
225
 
@@ -157,6 +157,9 @@
157
157
  <ClCompile Include="$(MSBuildThisFileDirectory)Networking\RedirectHttpFilter.cpp">
158
158
  <Filter>Source Files\Networking</Filter>
159
159
  </ClCompile>
160
+ <ClCompile Include="$(MSBuildThisFileDirectory)Modules\BlobModule.cpp">
161
+ <Filter>Source Files\Modules</Filter>
162
+ </ClCompile>
160
163
  </ItemGroup>
161
164
  <ItemGroup>
162
165
  <Filter Include="Source Files">
@@ -471,6 +474,15 @@
471
474
  <ClInclude Include="$(MSBuildThisFileDirectory)Networking\IRedirectEventSource.h">
472
475
  <Filter>Header Files\Networking</Filter>
473
476
  </ClInclude>
477
+ <ClInclude Include="$(MSBuildThisFileDirectory)Modules\BlobModule.h">
478
+ <Filter>Header Files\Modules</Filter>
479
+ </ClInclude>
480
+ <ClInclude Include="$(MSBuildThisFileDirectory)Modules\IWebSocketModuleProxy.h">
481
+ <Filter>Header Files\Modules</Filter>
482
+ </ClInclude>
483
+ <ClInclude Include="$(MSBuildThisFileDirectory)Modules\IWebSocketModuleContentHandler.h">
484
+ <Filter>Header Files\Modules</Filter>
485
+ </ClInclude>
474
486
  </ItemGroup>
475
487
  <ItemGroup>
476
488
  <None Include="$(MSBuildThisFileDirectory)tracing\rnw.wprp">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.68.18",
3
+ "version": "0.68.19",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",