Skip to content

CDN Hosting at Google Cloud Storage

Peter Krautzberger edited this page Feb 21, 2014 · 34 revisions

Note: these are preliminary notes about using Google Cloud Storage as a CDN service

Preliminaries

Copying

Notes:

This also works within google storage, i.e., gsutil cp gs://bucket1/file1 gs://bucket2/

make bucket public

Notes:

set CORS

Notes:

create XML file with

<?xml version="1.0" encoding="UTF-8"?>
<CorsConfig>
  <Cors>
        <Origins>
            <Origin>*</Origin>
        </Origins>
        <Methods>
            <Method>GET</Method>
            <Method>POST</Method>
            <Method>HEAD</Method>
        </Methods>
        <ResponseHeaders>
            <ResponseHeader>*</ResponseHeader>
        </ResponseHeaders>
        <MaxAgeSec>86400</MaxAgeSec>
    </Cors>
</CorsConfig>

Save as cors.xml and run

gsutil cors set cors.xml gs://fonts.acmecompany.com/

set headers

Notes:

TODO

  • test scripts to check setup
Clone this wiki locally