Setting up CORS with Google Cloud Storage

29 views
Skip to first unread message

Matt Parizeau

unread,
Oct 20, 2017, 2:01:26 PM10/20/17
to PDFTron WebViewer
Q:

I have documents hosted on Google Cloud Storage. How can I configure it so that cross origin requests work with WebViewer?

A:

Here is a link to Google's documentation on how to set up CORS on a bucket https://cloud.google.com/storage/docs/cross-origin
They describe a few different ways you can upload the CORS configuration to Cloud Storage.

The cors-json-file.json that you can use is:
[
   
{
     
"origin": ["*"],
     
"responseHeader": ["*"],
     
"method": ["*"],
     
"maxAgeSeconds": 3600
   
}
]


Reply all
Reply to author
Forward
0 new messages