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

Unified Diff: tools/testing/dart/http_server.dart

Issue 11641005: Add cross-origin test with credentials. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 0254ad10d107544a5baa283317270634687f064f..a46867e4146504541ee3b6cb42d67e3634801b10 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -32,7 +32,8 @@ void startHttpServer(String host, int port) {
file.exists().then((exists) {
if (exists) {
// Allow loading from localhost in browsers.
- resp.headers.set("Access-Control-Allow-Origin", "*");
+ resp.headers.set("Access-Control-Allow-Origin", "file://");
+ resp.headers.set('Access-Control-Allow-Credentials', 'true');
file.openInputStream().pipe(resp.outputStream);
} else {
resp.statusCode = HttpStatus.NOT_FOUND;

Powered by Google App Engine
This is Rietveld 408576698