Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngx_var_get causes nginx to core dump #140

Open
ne4u opened this issue Sep 28, 2022 · 0 comments
Open

ngx_var_get causes nginx to core dump #140

ne4u opened this issue Sep 28, 2022 · 0 comments

Comments

@ne4u
Copy link

ne4u commented Sep 28, 2022

When using ngx_var_get to get nginx variables the function will core dump on some variables if they are not set.

EX: ngx_var_get("referer"); will result in a core if the header doesn't exist. it works if the header is set. The work around is to put this in the nginx config:
set $ref $http_referer;
and use: ngx_var_get("ref");

However, if one uses:
ngx_var_get("https");
it will not core nginx if the variable https is not set in nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant