Welcome! Log In Create A New Profile

Advanced

Re: sad limitation with an if block

Maxim Dounin
December 29, 2009 01:20PM
Hello!

On Mon, Dec 21, 2009 at 05:19:13PM -0800, mike wrote:

> I wanted to do a conditional addition to fastcgi params:
>
> if ($http_host ~* 'secure-') {
> fastcgi_param HTTPS on;
> }
>
> However, nginx returns with "fastcgi_param is not allowed here"
>
> Any way to allow fastcgi_params to be included in a dynamic block?

Try this instead:

set $secure "";
if (...) {
set $secure "on";
}

fastcgi_param HTTPS $secure;

Maxim Dounin

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

sad limitation with an if block

mike December 29, 2009 12:42PM

Re: sad limitation with an if block

Maxim Dounin December 29, 2009 01:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 267
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