the resource was blocked due to mime mismatch

174 Views Asked by At

I am getting an error message when trying to use jquery to get the oembed of spotify

The resource from “https://open.spotify.com/oembed?format=json&url=https%3A//open.spotify.com/album/1YwzJz7CrV9fd9Qeb6oo1d&maxwidth=564&maxheight=564&callback=jQuery351037342674900972994_1607536811060&_=1607536811061” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff).

As you can see, the url is correct and it returns the JSON of the url

Is there a way to bypass this error?

1

There are 1 best solutions below

2
On

Why use jQuery? Just add an iframe like this:

<iframe src="https://open.spotify.com/embed/album/1YwzJz7CrV9fd9Qeb6oo1d" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>