25fb7e4c32
Currently, L7Policy already support the redirection by url_prefix. Then we can support the redirection with HTTP code. This patch adds an new option 'redirect_http_code' to L7Policy API. Story: 2003609 Task: 24941 Change-Id: Id0c9c376ffbc2fb10ddb988537d0ef1a8205e586
2 lines
421 B
Plaintext
2 lines
421 B
Plaintext
curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <token>" -d '{"l7policy":{"description":"Redirect requests to example.com","admin_state_up":true,"listener_id":"023f2e34-7806-443b-bfae-16c324569a3d","redirect_http_code":301,"redirect_url":"http://www.example.com","name":"redirect-example.com","action":"REDIRECT_TO_URL","position":1,"tags":["test_tag"]}}' http://198.51.100.10:9876/v2/lbaas/l7policies
|