From f3ce7cd76ee4f1772e2623c87b21bbbcb1edbc27 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Tue, 5 Mar 2024 04:03:30 -0800 Subject: [PATCH] feature(dev-middleware): add inspector proxy `nativeNetworkInspection` target capabilty flag (#43310) Summary: This adds the `nativeNetworkInspection` target capability flag, to enable/disable the proxy-side network inspection handling. ## Changelog: [GENERAL][ADDED] Add inspector proxy `nativeNetworkInspection` target capability flag Pull Request resolved: https://github.com/facebook/react-native/pull/43310 Test Plan: Once this lands, and is published through `react-native/dev-middleware`, we (Expo) can disable the proxy-side network inspection handling. See https://github.com/expo/expo/pull/27425/commits/1a1b601a29fbc5766628238db7259121689f6cd6 on PR expo/expo#27425 Reviewed By: christophpurrer, motiz88 Differential Revision: D54486516 Pulled By: huntie fbshipit-source-id: cc151349c816fb3866d3ec07af1a29a5f4ff9b00 --- packages/dev-middleware/src/inspector-proxy/types.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/dev-middleware/src/inspector-proxy/types.js b/packages/dev-middleware/src/inspector-proxy/types.js index f4994a812c4830..a89bfc9a914d57 100644 --- a/packages/dev-middleware/src/inspector-proxy/types.js +++ b/packages/dev-middleware/src/inspector-proxy/types.js @@ -30,6 +30,13 @@ export type TargetCapabilityFlags = $ReadOnly<{ * In the proxy, this disables source fetching emulation and host rewrites. */ nativeSourceCodeFetching?: boolean, + + /** + * The target supports native network inspection. + * + * In the proxy, this disables intercepting and storing network requests. + */ + nativeNetworkInspection?: boolean, }>; // Page information received from the device. New page is created for