Status Text: BADRESPONSE: Unexpected token <

Request Failure occurs when Nginx reverse proxy IIS

Specifically as shown below:

Status Text: BADRESPONSE: Unexpected token <

First, description, given by nginx proxy to access back-end IIS server, no problem when direct access to the IIS server, but there are problems with access nginx

nginx open debug log viewer, the following tips
client sent invalid header line: "X-Ext.Net : delta = true" while reading client request headers

Second, check the information on the Network, the following three points:
1, by default nginx reference variables can not be used when the underlined header variables. To solve this problem can only be configured underscores_in_headers on alone;
2, by default ignores the variables out underlined. To address this need to configure ignore_invalid headers OFF;
3, nginx will Henggang "-" are automatically converted to underscore "
."

Third, we know that the problem can be added after the http configuration
underscores_in_headers ON;
ignore_invalid_headers OFF;
reboot to load nginx, the problem is resolved.

Guess you like

Origin blog.51cto.com/darren88/2404940