Directives like QS_VipIPUser declare an IP as VIP based on request information. Is there a way to arbitrarily mark IPs as VIP, based on request information, similar to how requests can arbitrarily be marked as VIP by setting an environment variable?
For example, if the username matches a regular expression, set environment variable, which will then not only mark the request as VIP but all requests from this IP.
The directives QS_VipRequest and QS_IsVipRequest appear to only mark the request itself as VIP and I'm not sure what the difference between them is, though QS_VipRequest seems to have a dependency on QS_VipHeaderName, which QS_IsVipRequest does not have.
Last edit: Simon Studer 2024-07-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could use a client event counter to permanently mark an IP address (just ensure you never reach the counter's limit). Example for illustration (I've not tested this myself):
# counter to remember VIP
QS_ClientEventLimitCount 100 31536000 VIP_IP
# keep the counter low (never reach the limit)
QS_SetEnv VIP_IP_REFRESH 10
QS_SetEnvIfCmp VIP_IP_Counter gt VIP_IP_REFRESH VIP_IP_Decrement=2
# detect returning VIP user by IP
QS_SetEnv VIP_IP_IS_SET 0
QS_SetEnvIfCmp VIP_IP_Counter gt VIP_IP_IS_SET QS_VipRequest=1
# detect new user
QS_SetEnvIf User=... VIP_IP=1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Directives like
QS_VipIPUserdeclare an IP as VIP based on request information. Is there a way to arbitrarily mark IPs as VIP, based on request information, similar to how requests can arbitrarily be marked as VIP by setting an environment variable?For example, if the username matches a regular expression, set environment variable, which will then not only mark the request as VIP but all requests from this IP.
The directives QS_VipRequest and QS_IsVipRequest appear to only mark the request itself as VIP and I'm not sure what the difference between them is, though
QS_VipRequestseems to have a dependency on QS_VipHeaderName, whichQS_IsVipRequestdoes not have.Last edit: Simon Studer 2024-07-16
You could use a client event counter to permanently mark an IP address (just ensure you never reach the counter's limit). Example for illustration (I've not tested this myself):