diff --git a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js index be4fe3e13a966e..96d224a7cb19fb 100644 --- a/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js +++ b/packages/dev-middleware/src/inspector-proxy/InspectorProxy.js @@ -94,12 +94,13 @@ export default class InspectorProxy implements InspectorProxyQueries { response: ServerResponse, next: (?Error) => mixed, ) { + const pathname = url.parse(request.url).pathname; if ( - request.url === PAGES_LIST_JSON_URL || - request.url === PAGES_LIST_JSON_URL_2 + pathname === PAGES_LIST_JSON_URL || + pathname === PAGES_LIST_JSON_URL_2 ) { this._sendJsonResponse(response, this.getPageDescriptions()); - } else if (request.url === PAGES_LIST_JSON_VERSION_URL) { + } else if (pathname === PAGES_LIST_JSON_VERSION_URL) { this._sendJsonResponse(response, { Browser: 'Mobile JavaScript', 'Protocol-Version': '1.1',