[HOW TO] force nginx to send specific Content-Type when using alias

hi,

Long time no see,

I want to force nginx to send specific Content-Type for one paragraph. How to?

Last time, I can not change it, when I curl -I, it shows Content-Type: application/octet-stream;

And I want it to be:
Content-Tyoe: application/json;

Finally, I set it as:

  location /me/api/versions {
        default_type application/json;
        alias /home/www/html/me/api/versions.json;
  }


-Tien

Thank you for reading this article, please a comment if you are interested.

Tiến Phan - R0039

Knowledge is Endless

Sharing for Success

0 nhận xét:

Post a Comment