TAPevents / tap-i18n

A comprehensive internationalization solution for Meteor.
MIT License
329 stars 85 forks source link

Return correct content-type header ("application/json") #201

Closed nagelflorian closed 9 months ago

nagelflorian commented 7 years ago

Hey there,

we just ran into an issue with CloudFlare's Email obfuscation where we got a JSON parse error due to the obfuscation from CloudFlare. This can be avoided by sending out the translation JSON files with a content-type of application/json.

A page should have a MIME type (Content-Type) of "text/html" or "application/xhtml+xml" for the email obfuscation to happen. For instance, if you're doing some ajax calls, and wish to return email addresses in a JSON format, make sure your webserver returns a type of "application/json"