Search code examples
mongoose-web-server

Mongoose Web Server Config


I'm using the binary version of Mongoose embedded web server (mongoose-free-6.4.exe) to test a small project locally. I noticed that all requests are sent with the following header:

Content-Type: text/plain

Is it possible to force all requests to configure this to UTF-8??

Content-Type: text/html; charset=utf-8

I was looking poking around and do we need to recompile any configuration change ? I was unable to find an easy way to do this. Did I misse something?


Solution

  • I actually found the way to do this on mongoose.conf:

    # Add your special mime types here 
    m *.html=text/html; charset=utf-8
    

    I couldn't find a way to configure the default one on the other hand. But I found this on Git with limited information:

    https://github.com/cesanta/fossa/issues/238