SoundCloud API error 'Refused to execute… as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type' - jsonp

My site here here has suddenly stopped playing music tracks (I set these up via SoundCloud's API):
https://www.instrumentalbackgroundmusic.com/royalty-free-music/blueprint/
I'm a bit out of my depth here as my site was working fine, but now I've got Refused to execute [Soundcloud API URL with JSONP callback] as script because “X-Content-Type: nosniff” was given and its Content-Type is not a script MIME type' errors that I have no idea how to fix.
I've looked around online, but some of the solutions like setting up a proxy server aren't available to me, so I'm wondering if there's a fix I can implement on the server using HTACCESS or something?
Can anyone help guide me as to how I might fix the issue?

Related

How to receive XMLHTTPRequests on Server side?

it's probably I pretty dumb question but I just can't find any information online on how to do this. Probably I'm googling the wrong stuff.
I have to do 2 things. Send xml files via XMLHTTPRequests to a given Server. That's not a problem and easily done. But the company I'm working with also wants me to provide a Server that can receive XMLHTTPRequests and saves them into a file which I can then work with.
How do I handle this? Does I have to setup e.g. NGINX to do this or is this just a specific website I have to host? When I google for XMLHTTPRequests I only find how to send or get data but not how to setup the Server Side. I really have no clue.
Hope you can send me the right way so I can finally continue to work on this.
ty :)
You need a web server server side to receive requests from XMLHTTPRequest calls. You could set up NGINX to do this, or use any web server that you want.
This isn't usually covered in the documentation because you need to serve the page that contains the JavaScript with the XMLHTTPRequest from some server. To get to the point where you are making a XMLHTTPRequest, you already need some HTTP server set up and working. You would usually configure the page to be served from some a main URL like https://example.com/ and have the XMLHTTPRequest call to another URL like https://example.com/log-data would have you logic for storing to a file like your requirement.

Google oauth is responding with redirect_uri_mismatch error

My site is already live, example - https://www.example.io (with https)
I always get back this error
For some reason it is using HTTP although in the credentials i use https.
Btw this google API is already in production.
I'm not sure how to debug this. i tried http://localhost:3000 and it works perfectly for local development.
I'm using https://github.com/jaredhanson/passport-google-oauth with node.js
It works after i added a slash at the end
https://example.com/auth/google/callback
to
https://example.com/auth/google/callback/
I'm not sure though, but hope that this will help other people

Shopify App proxy showing "502 Bad Gateway" issue

I am trying to set shopify app proxy url. Although It was working fine before few days back but suddenly I am getting error "502 Bad Gateway".On the store page, it is showing message "There was an error in the third-party application". I also tried to test with different servers and have used both one by one "http" and "https" but I am getting same kind of error in all cases. Please suggest how to set shopify proxy url from shopify developer account. Below are test links:
https://dummy.sdnadev.com/test.html
And I tried to set proxy as :
http://dee1-11.myshopify.com/apps/PG-2C2P
Thanks
I got the solution. It not supporting subdomain. When I use full domain , it works with me.
Bad Gateway error in shopify is often caused when doing large POST or PUT that take longer than 90 seconds.

Instagram realtime api https

I'm coding an app in PHP and I've had issues starting a tag subscription when I don't use HTTPS, I've tested both ways and would prefer to use HTTP if possible.
Has anyone else run into this and know of a solution?
Their documentation doesn't show the need for https. When I use HTTP I get the error
Unable to reach callback URL "http://...
My issue wasn't https vs http. It was my function that curls the post data. I rebuilt it and it works now.
A note for future people trying to use the Realtime API it returns zero data about the Instagram post which I find odd, why note include a post id at the very least. All it currently does is ping your server with data about your subscription effected. Its also worth noting to see that data you have to use this command in PHP
$igdata = file_get_contents("php://input");

ASP.NET web service does not work in Safari

I have a WebForms page (.aspx) that accepts parameters via get / post and returns XML. This works in all browsers except for Safari where I get this gem:
Safari can’t open the page [URL]. The error was: “unknown error”
(CFURLErrorDomain:303) Please choose Report Bugs to Apple from the Help menu,
note the error number, and describe what you did before you saw this message.
Anyone see this before or know what it means?
UPDATE:
The web service is working for the http:// protocol, but fails under https://
Thank you, this did the trick for us.
context.Response.AddHeader("Content-Length", FilInfo.Length.ToString())
http://bit.ly/RTSnr4
I had the same problem. Worked via HTTP, didn't via HTTPS. Adding the Content-Length header fixed it for me:
Context.Response.AddHeader("Content-Length", result.Length)
Context.Response.Write(result)
Is it really Safari or is it Webkit? That is have you tried it with Chrome and/or Konquerer? It's possible that may give you an additional clue.