Cloudflare is changing the response content-type



i have an ajax form and the sever side controller generate errors with json objects.
my problem is cloudflare change the response content-type of error response from application/json to text/html and there will be no json object in my response .
but my local testing is working fine . what can i do to resolve this problem .

thanks in advance


Looks like Cloudflare is detecting mime type of the response and overwrites Content-Type with whatever it detects. I don’t see a way to disable this incorrect behavior.