ui extension: Allow connections from localhost
When we added the extension originally, it seemed like we needed to
proxy "localhost" via another hostname/domain to allow a local UI build
to connect to the extension. It seems this is actuall not necessary
(anymore?), based on local testing on canary. (I think we might have
attempted to specify a port in the url filter last time, but that's not
necessary.)
Let's try allowing localhost connections directly instead.
Change-Id: Ib70ac0500b4a8a340d5f045baf9b11d569fa9b67
diff --git a/ui/src/chrome_extension/index.ts b/ui/src/chrome_extension/index.ts
index 2d8f4fc..6350c84 100644
--- a/ui/src/chrome_extension/index.ts
+++ b/ui/src/chrome_extension/index.ts
@@ -54,7 +54,7 @@
}
chrome.declarativeContent.onPageChanged.removeRules(undefined, () => {
chrome.declarativeContent.onPageChanged.addRules([
- enableOnHostWithSuffix('.perfetto.local'),
+ enableOnHostWithSuffix('localhost'),
enableOnHostWithSuffix('.perfetto.dev'),
]);
});
diff --git a/ui/src/chrome_extension/manifest.json b/ui/src/chrome_extension/manifest.json
index 96dfe3e..5008c01 100644
--- a/ui/src/chrome_extension/manifest.json
+++ b/ui/src/chrome_extension/manifest.json
@@ -2,7 +2,7 @@
"name": "Perfetto UI",
"key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhm3X7qutsrskke84ltokTObnFJakd/d0XFQ6Ox2wQueHTGJM5GUNPTY/x8bdreNtGnfzvt/Sd0vABbR0wsS6lz5yY+g6ksMXJnigFe9N7uz8E3KojDrl3xYjIe+mkiJo8yxxzPydgb7GjQ6jmsX3g+yjj67kXzm9rZFkmoZ5WmqwBZlguPYVRN/W8CIIqBZkC3Qmq6uSG7b/g93YbwqmTmGiL2sAzgvXtqvDOD6503abtQkRC795E4VjJd+ffyeRH38fAEz5ZIrA6GJsfmov1TZTIu1NTwqylSpBYl5as7C6gpmuxDV4SvHvGT2hMQuIufDhZhErjI3B7bcX+XLe1wIDAQAB",
"description": "Enables the Perfetto trace viewer (https://ui.perfetto.dev) to record Chrome browser traces.",
- "version": "0.0.0.10",
+ "version": "0.0.0.11",
"manifest_version": 2,
"minimum_chrome_version": "81.0.4022.0",
"permissions": [
@@ -20,7 +20,7 @@
},
"externally_connectable": {
"matches": [
- "*://*.perfetto.local/*",
+ "*://localhost/*",
"https://*.perfetto.dev/*"
]
}