Force nginx to send specific Content-Type

You can edit /etc/nginx/mime.types and add it

types {
    application/xml        dae;
}

I haven't found the the exact string application/xml in my mime.types so I suppose you can directly include it inside your server block, in the server scope or something.


In case you have no file extension:

location ~ something {
   default_type application/xml;
}

Nginx docs for default_type

In case you are setting up let's encrypt certificate with a client which creates http server: How to use golang lego let's encrypt client behind nginx?