How do I set mime-types for Craft templates?
If you want to explicitly set the mime type from your template, you can do it with Craft's {% header %} tag:

{% header "Content-Type: application/json" %}


If it is already set via this method, Craft will go with it and not attempt to auto-detect/set the mime-type on it's own.