rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 313 forks source link

allow override content-type #517

Open gdaszuta opened 7 years ago

gdaszuta commented 7 years ago

In some cases there is need to manualy set content-type in controller before sending rendered response.

bigethan commented 7 years ago

Can you do this with the res.set(router.getHeadersForRoute(route)); code that's already there for custom headers? Or by adding some functionality into getHeadersForRoute as that's already there to load any custom headers that you need (see: https://github.com/rendrjs/rendr/blob/master/server/router.js#L111 )

Or is there a different use case that I'm missing?