I am very new to Nginx and I have below configuration in Nginx
server {
location /api {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
So now suppose if user access hostname/api/{{anything}}
should allow them to access
but user tries to access hostname/api/admin
it should deny them, So how I can achieve this?
Thanks