How does Google Chrome's Advanced REST client

2019-01-26 07:55发布

How does Google Chrome's ADVANCED REST CLIENT plugin make cross domain POST requests? I thought maybe something with CORS but I don't see "Access-Control-Allow-Origin" in any response. This is a link to the plugin:

https://chrome.google.com/webstore/detail/hgmloofddffdnphfgcellkdfbfbjeloo/related?hl=en-US

1条回答
Rolldiameter
2楼-- · 2019-01-26 08:23

Short answer: Extensions are different from normal web pages. They can ask for extra permissions during the course of installation.

(slightly) Long answer: The main requirement of plugins/extensions is that they are able to access different domains. They can ask for extra permission during the installation (The user is typically warned that the extension can access data on those domains).

Take a look at the manifest.json file of the extension you are talking about. More specifically:

"permissions": [
    "<all_urls>", "cookies", "history"
  ]
查看更多
登录 后发表回答