Hi there,
I need an authentication based on a parameterized class call in a url. For
example the url:
https://sample.com/index.php?cl=accesstestprivate
should be access-able by IP address 192.168.1.1, if the request doesnt come
from this IP, a basic auth should be invoked.
All other / pages e.g. index.php, index.php?start=1 should be access-able by
public.
I was trying to use the map function. But in this case, the site is not
available from public.
map $arg_cl $auth_type {
default „off";
"accesstestprivate“ "closed";
}
location / {
satisfy any;
allow 192.168.1.1;
auth_basic $auth_type;
auth_basic_user_file conf/htpasswd;
proxy_pass http://devserver;
}
Any ideas?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,271665,271665#msg-271665