Mime type text/plain

Helmi nginx-forum at nginx.us
Sun Dec 6 18:36:02 MSK 2009


i'm trying to get some files delivered via nginx. These files are textfiles containing HTML code. They don't have any file extension (and i can't change that due to special reasons). I'd like to deliver them with Content-Type text/html instead of text/plain which is chosen bei nginx due to reasons i don't know.

I've set default content type to text/html and also do explicitly set the conten type via add/header. Unfortunately the text/plain content type get's set before what results in a a header like this. "Content-Type text/plain text/html". In Safari this leads to a plain text display of the code instead of rendering the website.

How can i overwrite the content type to text/html for files without extenions?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,28379,28379#msg-28379

More information about the nginx mailing list