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
Unable to use valid_referers if server_name is set by a env. variable #581
Comments
@venomone It seems that you're having a directive running order issue. Do you know that |
@agentzh no i was not aware f it. im using openresty now since a week or so and im still thinking the NGINX way here i guess. So is there any solution for this problem? |
@venomone Easy. For your purposes, you can just do the “Referer” request header check all in Lua, like, say, in |
Do you maybe have a full example here, maybe a copy-paste example from you config or so. currently you have to derive everything yourself. Would be awesome, thank you. |
@venomone You can use the |
Hello,
im currently facing an issue, imagin the following nginx.conf:
i would expect that "server_names" is using server_name which i again load by a env. variable "env NGINX_SERVERNAMES;"
but for some reason NGINX openresty/nginx returns the following error at the log:
So how can i use valid_referers together with my server_name variable on openresty?
I also tryd the following:
valid_referers none blocked server_names $curr_server_name;
valid_referers none blocked $curr_server_name;
Which is also not working as expected.
The text was updated successfully, but these errors were encountered: