Starting from Chrome 76, header modifications affect Cross-Origin Resource Sharing (CORS) checks. If modified headers for cross-origin requests do not meet the criteria, it will result in sending a CORS preflight to ask the server if such headers can be accepted. If you really need to modify headers in a way to violate the CORS protocol, you need to specify
'extraHeaders'
inopt_extraInfoSpec
.Starting from Chrome 76, the following request header is not provided and cannot be modified or removed without specifying
'extraHeaders'
inopt_extraInfoSpec
:
--
You received this message because you are subscribed to the Google Groups "loading-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loading-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CAFWCB1%3DEKCwzsZqq8hu9LNRH675162v7KfiaCCDsjq0TAAEhKw%40mail.gmail.com.
Adding the chromium-extensions Google group.(I did not know extensions-dev existed)Also, note that normal users cannot set more than one component (and only at report-time using the wizard) on issues.
You can specify all those in a URL like it's done on chromestatus.com, see the "bug" button on an example page: link.
☆PhistucK
To unsubscribe from this group and stop receiving emails from it, send an email to loadi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/CAFWCB1%3DEKCwzsZqq8hu9LNRH675162v7KfiaCCDsjq0TAAEhKw%40mail.gmail.com.
--Takashi Toyoshima
Software Engineer, Google
--
You received this message because you are subscribed to the Google Groups "network-service-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to network-service...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/network-service-dev/3fce464c-88d9-46aa-be2f-b1d37750047c%40chromium.org.
Starting from Chrome 79, request header modifications affect Cross-Origin Resource Sharing (CORS) checks. If modified headers for cross-origin requests do not meet the criteria, it will result in sending a CORS preflight to ask the server if such headers can be accepted. If you really need to modify headers in a way to violate the CORS protocol, you need to specify
'extraHeaders'
inopt_extraInfoSpec
. On the other hand, response header modifications do not work to deceive CORS checks. If you need to deceive the CORS protocol, you also need to specify'extraHeaders'
for the response modifications.Starting from Chrome 79, the following request header is not provided and cannot be modified or removed without specifying
'extraHeaders'
inopt_extraInfoSpec
:
Thank you for the update.I have a question about not being able to modify the origin header. I think in Chrome 73 any request from the background.js page would set the Origin: chrome-extension://myextensionid even if the domain was listed in the permissions area of the manifest. I can't tell if that was on purpose or was a bug because I found a few bug reports about it. We've had to modify the origin headers using onBeforeSendHeaders because of this issue.
So my questions is will background.js requests set the origin to the actual domain of the request if the domain is listed in the permissions manifest, and if not how are we expected to make requests on behalf of the user if the origin is not correct?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/network-service-dev/2ee1399e-aa65-4cd4-9578-705d1387e3a5%40chromium.org.
Starting from Chrome 79, request header modifications affect Cross-Origin Resource Sharing (CORS) checks. If modified headers for cross-origin requests do not meet the criteria, it will result in sending a CORS preflight to ask the server if such headers can be accepted. If you really need to modify headers in a way to violate the CORS protocol, you need to specify 'extraHeaders'
in opt_extraInfoSpec
. On the other hand, response header modifications do not work to deceive CORS checks. If you need to deceive the CORS protocol, you also need to specify 'extraHeaders'
for the response modifications.
Starting from Chrome 79, the webRequest API does not intercept CORS preflight requests and responses by default. A CORS preflight for a request URL is visible to an extension if there is a listener with 'extraHeaders'
specified in opt_extraInfoSpec
for the request URL. onBeforeRequest
can also take 'extraHeaders'
from Chrome 79.
Starting from Chrome 79, the following request header is not provided and cannot be modified or removed without specifying 'extraHeaders'
in opt_extraInfoSpec
:
Starting from Chrome 72, if you need to modify responses before Cross Origin Read Blocking (CORB) can block the response, you need to specify 'extraHeaders'
in opt_extraInfpSpec
.
Thanks,
Thank you for the update.
How do we test this upcoming change?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/network-service-dev/cecda8e6-7a0f-459c-8c04-be7ab081b541%40chromium.org.
Hello everyone!We currently have two chrome extensions (dmgfneofbepinecipidiiogfamkfgjon and mnfkepfkbemjhmpijcepabfhkldegbga) that make cross-origin network requests from a content script (ie. when a user is visiting 8vc.com, the content script will make a $.ajax/XMLHttpRequest to affinity.co). We do not modify any requests that 8vc.com makes, and these two extensions do not have the webRequest or webRequestBlocking chrome extension permission. We were under the impression that since we did not use the webRequest API and that our two extensions are on the CORS whitelist (see https://bugs.chromium.org/p/chromium/issues/detail?id=935705 and https://bugs.chromium.org/p/chromium/issues/detail?id=935707), that we would not be susceptible to this change.When Chrome Beta v79 was released earlier this week, our users on Chrome Beta started reporting that they were unable to use our chrome extension (we've confirmed that it still works in v78). We're currently debugging this issue and have been getting the following error message in the console, when making requests from our content script in v79:Cross-Origin Read Blocking (CORB) blocked cross-origin response https://affinity.affinity.co/api/delibird with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.However, we're having trouble isolating this issue because when we explicitly set the flag chrome://flags/#out-of-blink-cors to Disabled in v79, the issue persists.What's also confusing is that when we try to reproduce the issue in Chrome Canary (v80), explicitly set the flag chrome://flags/#out-of-blink-cors to Enabled, our extension behaves as intended.Would you happen to know whether the issue we're currently debugging is related to this OOR-CORS change? Or if there are any other v79 updates that might be causing this issue?Best,Hansen
On Monday, October 28, 2019 at 10:31:29 PM UTC-7, Takashi Toyoshima wrote:
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/network-service-dev/f5f3399e-0db8-49db-b3d3-1a520da2854b%40chromium.org.
Thank you. I'm testing chrome beta 79.0.3945.16Our extension (mhkhmbddkmdggbhaaaodilponhnccicb) does some cross-domain calls. We moved all of our content script ajax calls the background.js to meet Cross-Origin Read Blocking (CORB) requirements. In doing that we noticed requests origin headers were set to Origin: chrome-extension://myexensionid, which broke the calls. We had to implement onBeforeSendHeaders.addListener to correct the Origin header.My understanding was that if the manifest had permissions for the cross-domain target that the Origin header would not be set to Origin: chrome-extension://myexensionid, but the actual domain target.ReferenceCan someone please shed some light on this issue? Between the CORB changes, manifest v3, and background.js changes it's becoming very difficult to keep track of upcoming issues.
On Monday, October 28, 2019 at 10:31:12 PM UTC-7, Takashi Toyoshima wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to loading-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/loading-dev/dee2971d-3999-4f71-82d0-61d0ca1e4f71%40chromium.org.