Change the order in which HTTP policies are applied in the rule
The order in which HTTP policies are applied depends on the policy action. Traffic rejection policies (REJECT) are applied first, followed by URL referral policies (REDIRECT_TO_URL) and URL prefix (REDIRECT_PREFIX), then target group referral policies (REDIRECT_TO_POOL).
If there are multiple HTTP policies with the same action in a rule, they are applied according to the policy position in the balancer rule. You can change the policy position.
Control panel
OpenStack CLI
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Go to Balancers → Balancers tab.
-
Open the balancer page.
-
Open the rule card.
-
In the HTTP Policies block, drag and drop the policies. The policy that is above the other policies with the same action is applied first.
-
Click Confirm.
-
Change the HTTP policy position in the rule:
openstack loadbalancer l7policy set --position <position> <policy>
Specify:
<position>
— the position of the policy in the rule, e.g., a policy with position1
will be applied first among policies with the same action;<policy>
— The ID or name of the HTTP policy. The list can be viewed with the commandopenstack loadbalancer l7policy list
.