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 Site
- Create the Domain Name you would like to use, this can be any fully qualified domain name. For this example, the bucket address was used.
- Specify your bucket URL. Select "Origin Authentication" value, or leave at the default "None" if no authentication is required.
4.2 Go into the Settings tab 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, or add this as a custom option, if necessary.
Test the Site's Edge Address 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 Edge Address can now be used to view any objects inside the bucket by going to
cdnurlwith the actual Edge Address that was provided upon creating the Site.)
Connecting the StackPath CDN to your GCS Bucket can be useful for