Stream: refused to get unsafe header "stream-media-id"

I’ve managed to upload with TUS to Cloudflare Stream, but I can’t get the stream-media-id because of this error in Chrome.

This is my code, it is running in a Vue app, so in browser.

Can view it in the network tab though


This is from the Node docs https://developers.cloudflare.com/stream/uploading-videos/upload-video-file#resumable-uploads-with-tus-for-large-files

This is a bug! We’ll fix in a few hours!

This should now be fixed, could you please retry?

Thanks @renan! I’m guessing you had to expose the headers or something like that yeh? I thought it couldn’t possibly be you, it had to be me :slight_smile:

For those following along this is my new code. (Vue App)

onAfterResponse: (req, res) => {
      this.streamId = res.getHeader("stream-media-id");
    }  

But in the interim, I did manage to get it server-side and send to my client as well…as is currently documented.

Yep no problem! The stream-media-id header had to be in access-control-expose-headers list for your Javascript to read it and it was missing due to a mistake on our side :slight_smile:.

Glad it works for you now.