Custom Content-Type for File in Rails 'public' Folder
- by Kevin Sylvestre
For assets stored in the 'public' folder of a ruby-on-rails application is it possible to change the 'Content-Type' when running 'script/server'? For example, I am attempting to create an HTML5 application supporting offline mode, and have an 'offline.manifest'. When I run:
curl -I localhost:3000/offline.mainfest
The following header information is returned:
HTTP/1.1 200 OK
...
Content-Type: text/plain
...
However, HTML5 specifications require:
HTTP/1.1 200 OK
...
Content-Type: text/cache-manifest
...