如何替换请求头内容类型?

时间:2016-07-30 04:12:40

标签: javascript node.js nginx server content-type

http {
    include       mime.types;
    default_type  text/plain;


  server{
    listen 3001;
    server_name localhost;

    location /token {
      proxy_hide_header Content-Type;
      proxy_set_header Content-Type "text/plain; charset=utf-8";
   //...//
    }
  }
}

我发送了Content-Type: application/json标头,但我想将其替换为text/plain。我的nginx代码不起作用。我该如何解决?

0 个答案:

没有答案