I am building an extension for chrome that should work with (externally connect to) one or more websites. To test it I have the website running on a server in the local network and connect to it from machines in the local network that have the extension installed.
I tried something like this
"externally_connectable": {
"matches": [
"http://192.168.1.109:8080/*"
],
"accepts_tls_channel_id": false
},
in the manifest.json
file but it didn't work. Ideally i would like to allow all urls to connect at least during development.
Unfortunately you cannot do that.
Quoting the docs:
The URL pattern must contain at least a second-level domain - that is, hostname patterns like
"*"
,"*.com"
,"*.co.uk"
, and"*.appspot.com"
are prohibited.
While this does not specifically disallow IPs, apparently they don't work, and under no circumstance you can give a wildcard for any site:
Patterns cannot include wildcard domains nor subdomains of (effective) top level domains;
*://google.com/*
andhttp://*.chromium.org/*
are valid, while<all_urls>
,http://*/*
,*://*.com/*
, and evenhttp://*.appspot.com/*
are not.
For testing, you can assign a second-level domain to your local address in the hosts
file for your OS.