openaustralia / morph

Take the hassle out of web scraping
https://morph.io
GNU Affero General Public License v3.0
461 stars 74 forks source link

API responds with wrong MIME type (application/json, not application/javascript) #1176

Closed andylolz closed 6 years ago

andylolz commented 6 years ago

Reposting from https://github.com/openaustralia/morph/issues/371#issuecomment-368476295, because that issue is old & closed. I use the API over javascript a lot, and it’s currently broken in Chrome.


I’m using the javascript example (in the browser) on the API page, and hitting the following error:

Refused to execute script from '[URL]' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.

The same code previously worked fine. Would the MIME type of the response have changed for some reason?

mlandauer commented 6 years ago

@andylolz oops. sorry. that's more than likely my fault as yesterday I started doing some emergency work on the scraper data api to improve its memory profile. So, I probably broke this. I'll look at this a bit later today...

andylolz commented 6 years ago

Great! Thanks @mlandauer

mlandauer commented 6 years ago

that's deployed to production so should be hopefully back to normal. @andylolz please do let me know if you see anything else amiss. Thanks for reporting the problem.

andylolz commented 6 years ago

Looks good to me. Thanks for addressing this so promptly!