News:

AbanteCart v1.4.2 is released.

Main Menu

NEW Chrome update about CORS

Started by Sam_78, June 14, 2022, 10:27:34 AM

Previous topic - Next topic

Sam_78

Hi,

Does anyone have an idea where to update this https://developer.chrome.com/blog/private-network-access-preflight/  I am getting errors in browsers for some images which are on the same server and on refresh that error goes away

error example : has been blocked by CORS policy: Request had a target IP address space of `unknown` yet the resource is in address space `unknown`.
Image is on the same server

How or where to set this ? Access-Control-Request-Private-Network: true

HADY

Quote from: Sam_78 on June 14, 2022, 10:27:34 AM
Hi,

Does anyone have an idea where to update this https://developer.chrome.com/blog/private-network-access-preflight/  I am getting errors in browsers for some images which are on the same server and on refresh that error goes away

error example : has been blocked by CORS policy: Request had a target IP address space of `unknown` yet the resource is in address space `unknown`.
Image is on the same server

How or where to set this ? Access-Control-Request-Private-Network: true


Cross-Origin Resource Sharing (CORS) errors occur when a server doesn't return the HTTP headers required by the CORS standard. To resolve a CORS error from an API Gateway REST API or HTTP API, you must reconfigure the API to meet the CORS standard.



Turn OFF the CORS plugin, reload the app, at this time you should still get the errors which are correct. ii. Turn it back ON, reload the app, if the APIs are successful, stop here.
Thank you In Advanced
Regards
HADY

Sam_78

Hi,

These are not API Calls. I am getting these errors for images. Product images are not loading and I get this error in console(inspect) . When I clear cache and reload the page it loads and some other image or JS or CSS script will not load with similar error.  I think we need to add this line somewhere in htaccess or in code and I am not sure where.

Basara


Sam_78

Hi, I am still having this issue

Access to CSS stylesheet at 'https://www.domain.com/admin/view/default/stylesheet/chosen.bootstrap.css'; from origin 'https://www.domain.com' has been blocked by CORS policy: Request had a target IP address space of `unknown` yet the resource is in address space `public`.

On simple refresh this issue gets resolved and some other script or image gets missing.

Sam_78

All these scripts are from same server then there should be no question for CORS. I am confused how is this only applying to random images / scripts and not all of them.

Basara

Hello. Did you apply the patch?
Please also clear all AbanteCart caches and check your store URL is same you visit in the browser

Sam_78

Yes I applied the patch and cleared browser and abanteCart cache. I also tried other solutions and it didn't work. 

Basara

Hello.
Can you please post the URL to your store?

Forum Rules Code of conduct
AbanteCart.com 2010 -