Setting Up Bucket Access
- Select the bucket settings drop-down and select edit bucket permissions
allUsersinto the "Add members" field, and choose Storage Object Viewer from the Select Role drop-down
- Select Add and then the bucket will have global read-only permissions
Setting Up The CDN
In this tutorial, a bucket named "stackpathtesting" was used for integration. Replace any instance of "stackpathtesting" or <bucketname> with the actual name of the bucket you would like to integrate.
Log in to the StackPath Control Panel
Create a new CDN site
Create the Delivery Domain you would like to use, this can be any fully qualified domain name, but for this example, the bucket address was used.
- Select GCS Bucket for the Source, and then specify your bucket URL:
4.2 Go into the Settings for the newly created site and confirm that the Host Header is
<bucketname>.storage.googleapis.com. You can check the full host header by clicking on the dropdown menu.
Test the CDN URL by navigating via the browser. This should produce an XML file that indexes the content of your GCS Bucket, showing that the CDN has access. The CDN URL can now be used to view any objects inside the bucket by going to
cdnurlwith the actual CDN URL that was provided upon creating the CDN Site.)
Connecting the StackPath CDN to your GCS Bucket can be useful for