Google Cloud CDN CORS issue

1,683 views
Skip to first unread message

Peter Ho

unread,
May 12, 2019, 9:36:14 AM5/12/19
to gce-discussion
Your firewall is incompatible with the load balancer
To use the HTTPS load balancer, add the following firewall rule to allow traffic from the load balancer to the backend service wp-backend-service.
Source IP range
Allowed protocols and ports
tcp:80


I have created  a Compute Engine - VM and have several website installed.
Also I have created Network services - Load balancing 
- Backend configuration : Created Backend services and join the instance group with sames VM abvoe.
- Created Cloud CDN and config SSL certificate also done.


When I visit the website, the following CORS issue occured
Access to resource at 'https://cdn.ua.sugarproject.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/manifest.json.php?gcm_sender_id=' from origin 'https://united-athle.hk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have read Cross-origin resource sharing (CORS), but not really sure how to config. My storage is in VM engine.

Anyone have idea?

Germán (Google Cloud Support)

unread,
May 21, 2019, 4:20:58 PM5/21/19
to gce-discussion
Hello,

The error you are receiving is due to the missing ‘Access-Control-Allow-Origin’ header you need to include on your website pages. Without the header the error message will continue. There's a good guide on this at [1]

[1]https://www.html5rocks.com/en/tutorials/cors/
Reply all
Reply to author
Forward
0 new messages