Ng2-pdf-viewer: Firebase: No 'Access-Control-Allow-Origin' header is present on the requested resource

Created on 29 Apr 2018  路  2Comments  路  Source: VadimDez/ng2-pdf-viewer

I am getting the 'Access-Control-Allow-Origin' with firebase. How can I solve this?

Failed to load https://firebasestorage.googleapis.com/v***********8***-uploads%2Fcollections%2FYd8em6dN%2Fpages%2FrkevJ82Y?alt=media&token=0242276f-bf67-4b2c-be93-8d64a248e72f:
 No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
core.js:1448 ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute 'postMessage' on 'Worker': TypeError: Failed to fetch could not be cloned.
Error: Failed to execute 'postMessage' on 'Worker': TypeError: Failed to fetch could not be cloned.
    at MessageHandler.postMessage (pdf.js:1357)
    at sendStreamRequest (pdf.js:1174)
  ......

Most helpful comment

I did. I needed to set cors for my firebase project.
https://firebase.google.com/docs/storage/web/download-files

All 2 comments

Same :/
did you find a solution ?

I did. I needed to set cors for my firebase project.
https://firebase.google.com/docs/storage/web/download-files

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asadullazadeh picture asadullazadeh  路  4Comments

jgrant95 picture jgrant95  路  6Comments

manojbhardwaj picture manojbhardwaj  路  7Comments

RahmatAliMalik5 picture RahmatAliMalik5  路  5Comments

VadimDez picture VadimDez  路  5Comments