passenger icon indicating copy to clipboard operation
passenger copied to clipboard

passenger config values do not accept Nginx variables

Open nikolay opened this issue 9 years ago • 10 comments

passenger_env_var VAR $nginx_var; sets VAR to $nginx_var, not its value.

nikolay avatar Mar 21 '16 17:03 nikolay

Does it work when you remove VAR?

OnixGH avatar Mar 21 '16 17:03 OnixGH

@FooBarWidget @OnixGH It's not an optional parameter. I'm using init_by_lua_block to set some global variables during Nginx start (not set per request), but it doesn't seem to work even with globals.

nikolay avatar Mar 21 '16 20:03 nikolay

does this have any update? We definitely need it...

I can't even pass

passenger_env_var DOMAIN ${host};

phoenixgao avatar Apr 07 '17 09:04 phoenixgao

I can confirm that this doesn't work. Leaving it as an enhancement request.

CamJN avatar Apr 12 '17 14:04 CamJN

Labelled as Enhancement... What a joke ! Do you realize that evaluating a variable is some computer science basic feature ?

Please can you reconsider your point of view ?

leguminator avatar Oct 04 '17 15:10 leguminator

I do realize that it's a fairly basic enhancement. But I also realize that a business has to have priorities. However you are free to open a pull request to add the functionality if you like.

CamJN avatar Oct 04 '17 15:10 CamJN

@CamJN could you point me in the right direction? I've submitted an issue for this same problem (https://github.com/phusion/passenger/issues/2024). I really need this feature to solve a critical business problem.

dannykopping avatar Jan 30 '18 14:01 dannykopping

@dannykopping If you want to work on this then you can look at src/nginx_module/ngx_http_passenger_module.c and https://www.nginx.com/resources/wiki/extending/api/variables/ to get started.

CamJN avatar Jan 30 '18 16:01 CamJN

This issue blocks implementation of Shibboleth authentication in a secure way, as recommended by nginx-http-shibboleth's maintainer.

Currently, it is only possible to implement it using shib_request_use_headers, which is prone to header spoofing if misconfigured or e.g. if after an update omniauth suddenly decides to start using a new header which is not filtered.

thotypous avatar Apr 15 '18 15:04 thotypous

@CamJN Hola. Need this for another client.

ajaya avatar Oct 17 '18 23:10 ajaya