500px-js-sdk icon indicating copy to clipboard operation
500px-js-sdk copied to clipboard

Script response blocked due to MIME type mismatch

Open villasv opened this issue 9 years ago • 3 comments

The call to "/users/17211083/galleries/22943929/items" returns successfully, but adding options like image_size (e.g. "/users/17211083/galleries/22943929/items?image_size=4") will give me

SEC7112: Script from https://api.500px.com/v1/users/17211083/galleries/22943929/items?image_size=4.jsonp?_method=get&sdk_key=b21f5981983b2e4c118beb296a534f4a070f8dd3&callback=_500pxCallback28421498 was blocked due to mime type mismatch

Searching on SO I found related issues that mention the X-Content-Type-Options: nosniff and no MIME types.

From the Edge docs:

SEC7112 "Script from [URL] was blocked due to mime type mismatch"

The HTTP response header for the JavaScript file specified by the URL has an "X-Content-Type-Options: nosniff" header, and didn't have a recognized content type declaration.

Update the server to send the correct content type for the JavaScript file (such as text/javascript, application/javascript", and so on) in theHTTP response header. See MIME-Handling Changes in Internet Explorer for more info and a full list of content types.

(I'm testing on Edge, not IE9)

villasv avatar Apr 25 '16 14:04 villasv

@villasv Any update on this? Have you fixed this issue?

deepak-netwin avatar Nov 19 '16 07:11 deepak-netwin

I'm afraid not. IIRC I just avoided using options

villasv avatar Nov 19 '16 16:11 villasv

I had similar error.

After:

jspm update 

fixed.

gustawdaniel avatar Feb 18 '17 10:02 gustawdaniel