Skip to content Skip to sidebar Skip to footer

Node, Express App Returns Text/javascript Response Header (content-type) In Spite Of Setting Application/javascript

I am trying to return jsonp from my express, nodejs application and I keep getting text/javascript instead of application/javascript (which I think should be the correct Content-Ty

Solution 1:

I'm afraid that the content type is hard coded in Express. See here.

By the looks of it, the only way around that is to re-implement .jsonp() yourself (or create an issue on GitHub for the Express devs to fix it).

Post a Comment for "Node, Express App Returns Text/javascript Response Header (content-type) In Spite Of Setting Application/javascript"