Index: runtime/bin/vmservice/server.dart |
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart |
index 9a48adf3bbe9bba32782e3ada6df2f8665368611..020badbefd471798b5a1679b77425672b8a9514a 100644 |
--- a/runtime/bin/vmservice/server.dart |
+++ b/runtime/bin/vmservice/server.dart |
@@ -166,7 +166,7 @@ class Server { |
} |
bool _originCheck(HttpRequest request) { |
- if (_originCheckDisabled) { |
+ if (_originCheckDisabled || Platform.isFuchsia) { |
// Always allow. |
return true; |
} |
@@ -306,12 +306,16 @@ class Server { |
// Startup HTTP server. |
try { |
- var addresses = await InternetAddress.lookup(_ip); |
var address; |
- // Prefer IPv4 addresses. |
- for (var i = 0; i < addresses.length; i++) { |
- address = addresses[i]; |
- if (address.type == InternetAddressType.IP_V4) break; |
+ if (Platform.isFuchsia) { |
+ address = InternetAddress.ANY_IP_V6; |
siva
2017/01/13 18:33:00
Will this also work for clients that only have IPv
zra
2017/01/13 20:25:57
Yes, I have verified that I can connect from my de
|
+ } else { |
+ var addresses = await InternetAddress.lookup(_ip); |
+ // Prefer IPv4 addresses. |
+ for (var i = 0; i < addresses.length; i++) { |
+ address = addresses[i]; |
+ if (address.type == InternetAddressType.IP_V4) break; |
+ } |
} |
_server = await HttpServer.bind(address, _port); |
_server.listen(_requestHandler, cancelOnError: true); |