Author Topic: NEW Chrome update about CORS  (Read 3146 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
NEW Chrome update about CORS
« 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

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: NEW Chrome update about CORS
« Reply #1 on: June 14, 2022, 10:41:07 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

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: NEW Chrome update about CORS
« Reply #2 on: June 14, 2022, 12:19:08 PM »
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.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5777
  • Karma: +274/-2
    • View Profile
Re: NEW Chrome update about CORS
« Reply #3 on: June 15, 2022, 01:34:04 AM »

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: NEW Chrome update about CORS
« Reply #4 on: June 20, 2022, 11:31:18 AM »
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.

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: NEW Chrome update about CORS
« Reply #5 on: June 20, 2022, 02:40:03 PM »
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.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5777
  • Karma: +274/-2
    • View Profile
Re: NEW Chrome update about CORS
« Reply #6 on: June 21, 2022, 12:15:34 AM »
Hello. Did you apply the patch?
Please also clear all AbanteCart caches and check your store URL is same you visit in the browser

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: NEW Chrome update about CORS
« Reply #7 on: June 27, 2022, 02:55:37 PM »
Yes I applied the patch and cleared browser and abanteCart cache. I also tried other solutions and it didn't work. 

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5777
  • Karma: +274/-2
    • View Profile
Re: NEW Chrome update about CORS
« Reply #8 on: June 28, 2022, 02:26:54 AM »
Hello.
Can you please post the URL to your store?

 

Powered by SMFPacks Social Login Mod