Welcome! Log In Create A New Profile

Advanced

Re: Return JSON for 404 error instead of html

Francis Daly
May 15, 2014 03:20AM
On Wed, May 14, 2014 at 06:38:45PM -0400, justink101 wrote:

Hi there,

> If I try and
> fetch a header that I know is being returned from the proxy it is
> undefined.
>
> location @four_o_four {
> internal;
> more_set_headers "X-Host: $sent_http_x_host";

What value do you think $sent_http_x_host has, and why do you think that?

Compare $http_name and $sent_http_name in
http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
with $upstream_http_... in
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables

and then use $upstream_http_x_host.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Return JSON for 404 error instead of html

justink101 May 13, 2014 12:08AM

Re: Return JSON for 404 error instead of html

Lord Nynex May 13, 2014 02:44AM

Re: Return JSON for 404 error instead of html

Matthias Rieber May 13, 2014 04:46AM

Re: Return JSON for 404 error instead of html

justink101 May 14, 2014 06:38PM

Re: Return JSON for 404 error instead of html

Francis Daly May 15, 2014 03:20AM

Re: Return JSON for 404 error instead of html

Valentin V. Bartenev May 13, 2014 05:02AM

Re: Return JSON for 404 error instead of html

B.R. May 13, 2014 09:32AM

Re: Return JSON for 404 error instead of html

Valentin V. Bartenev May 13, 2014 10:38AM

Re: Return JSON for 404 error instead of html

Justin Dorfman May 13, 2014 11:50AM

Re: Return JSON for 404 error instead of html

Valentin V. Bartenev May 13, 2014 11:54AM

Re: Return JSON for 404 error instead of html

Justin Dorfman May 13, 2014 12:08PM

Re: Return JSON for 404 error instead of html

B.R. May 13, 2014 03:18PM

Re: Return JSON for 404 error instead of html

Francis Daly May 13, 2014 04:16PM

Re: Return JSON for 404 error instead of html

B.R. May 13, 2014 08:54PM

Re: Return JSON for 404 error instead of html

justink101 May 14, 2014 05:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready