mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add 127.0.0.1 to allowlist for source map fetch
Summary: Adds ipv4 localhost representation (127.0.0.1) to allowlisted hostnames for the inspector-proxy, to allow for proxied network requests fetching source maps. Changelog: [General][Fixed] Allow source map fetching in the inspector proxy from 127.0.0.1 Reviewed By: motiz88 Differential Revision: D52112849 fbshipit-source-id: e6d45fa2fdfd570b7ab4f36121ba615c9b06d442
This commit is contained in:
committed by
Facebook GitHub Bot
parent
957a1977b3
commit
46d304a101
@@ -674,7 +674,7 @@ export default class Device {
|
||||
// Fetch text, raising an exception if the text could not be fetched,
|
||||
// or is too large.
|
||||
async _fetchText(url: URL): Promise<string> {
|
||||
if (url.hostname !== 'localhost') {
|
||||
if (!['localhost', '127.0.0.1'].includes(url.hostname)) {
|
||||
throw new Error('remote fetches not permitted');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user