Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Unified Diff: runtime/bin/vmservice/server.dart

Issue 2626043006: Fuchsia: Disable service origin check. Bind service to all interfaces. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/platform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | sdk/lib/io/platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698