问题
I have CDN setup for my Google CLoud Storage bucket. I have uploaded a public object, you can see it with the public link here: https://storage.googleapis.com/staging.twinkle-4acfc.appspot.com/example_out_message_bg.9.png
So in order for the CDN to work, as per this question, I need to access the bucket through the load balancer.
Okay, so I setup the load balancer, this URL is directed to the bucket, and it is a public object, but the response contains an XML access error.
http://130.211.26.19/stagemedia/example_out_message_bg.9.png
In fact, you can change the path to anything, just try /a, the error is the same. Is the load balancer set up incorrectly?
回答1:
Your object needs to match the whole path, which in this case is "stagemedia/example_out_message_bg.9.png". Try creating an object with that whole name, including the "stagemedia/" part.
回答2:
You may need to have your object publicly shared as well, as described in docs here: https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing#configuring_a_bucket
来源:https://stackoverflow.com/questions/45289674/public-object-in-cloud-storage-bucket-isnt-accessible-through-load-balancer