-1

I am trying to upload a pdf file from vue webapp with this code

let storageRef = firebase.storage().ref();
let uploadTask = storageRef.child("results").put(file);

When I select the file, in the console, I am seeing this error.

(Reason: header ‘x-firebase-gmpid’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response)

I have tried setting cors config via gsutil

[
  {
    "origin": ["*"],
    "responseHeader": ["Content-Type"],
    "method": ["GET", "HEAD", "DELETE"],
    "maxAgeSeconds": 3600
  }
]

still getting the same error.

logdog
  • 3
  • 3

1 Answers1

2

It's a bug in the most recent firebase js version, v7.9.2. If you downgrade firebase to v7.9.1 the error will go away.

norm
  • 36
  • 1