What does “http://*/*”, “https://*/*” and “

2019-01-08 22:00发布

问题:

I am trying to understand the working of Google chrome extensions. I was studying the manifest.json file where I came across the permissions "http://*/*", "https://*/*" and "<all_urls>"

Can anybody explain what do these permissions mean?

回答1:

  • "<all_urls>": matches any URL that starts with a permitted scheme (http:, https:, file:, ftp:, or chrome-extension:).
  • "http://*/*": Matches any URL that uses the http: scheme.
  • "https://*/*": Matches any URL that uses the https: scheme.
  • "*://*/*": Matches any URL that uses the https: or http: scheme.

These permissions are required if your Chrome extension wants to interact with the code running on pages.

Match patterns documentation