HTTP response URL rewrite enables the system to rewrite the specified Location header value in the HTTP responses returned by the real service for the requests accessing a virtual service.
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | service | asso | |
| default | name | string | |
| default | priority | uint32 | |
| default | orig_protocol | enum | Sets the protocol in the Location header value of the HTTP response returned from the real service.Available values:
|
| default | orig_host | string | Sets the string used to match the Host value in the Location header of the HTTP response. |
| default | path_regex | string | Sets the string used to match the Path value in the Location header of the HTTP response. |
| default | new_protocol | enum | Sets the protocol in the Location header value after rewriting.Available values:
|
| default | new_host | string | Sets the host in the Location header value after rewriting. |
| default | path_replacement | string | Sets the path in the Location header value after rewriting. |
{
"HTTPRewriteRespURL": {
"meta": {
"abstract": false,
"verbose_name": HTTP Response URL Rewrite,
},
"fieldgroups": [
{
"fields": [
{
"verbose_name": field_verbose_name1,
"field_name": field_name1
},
...
],
"group_name": field_group_name1
},
...
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| service | asso | |
| name | string | |
| priority | uint32 | |
| orig_protocol | enum | Sets the protocol in the Location header value of the HTTP response returned from the real service.Available values:
|
| orig_host | string | Sets the string used to match the Host value in the Location header of the HTTP response. |
| path_regex | string | Sets the string used to match the Path value in the Location header of the HTTP response. |
| new_protocol | enum | Sets the protocol in the Location header value after rewriting.Available values:
|
| new_host | string | Sets the host in the Location header value after rewriting. |
| path_replacement | string | Sets the path in the Location header value after rewriting. |
{
"HTTPRewriteRespURL": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"HTTPRewriteRespURL": [
{
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
},
...
]
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_group_name | URI | (optional) Target field group name to query. Available names are: default, Notice: There could only be one field_group_name or field_name in the URL. And if both field_group_name and field_name are not specified, will try to query default field_group data. |
| field_name | URI | (optional) Target field name to query. Available names are: service, name, priority, orig_protocol, orig_host, path_regex, new_protocol, new_host, path_replacement, Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | service | asso | |
| default | name | string | |
| default | priority | uint32 | |
| default | orig_protocol | enum | Sets the protocol in the Location header value of the HTTP response returned from the real service.Available values:
|
| default | orig_host | string | Sets the string used to match the Host value in the Location header of the HTTP response. |
| default | path_regex | string | Sets the string used to match the Path value in the Location header of the HTTP response. |
| default | new_protocol | enum | Sets the protocol in the Location header value after rewriting.Available values:
|
| default | new_host | string | Sets the host in the Location header value after rewriting. |
| default | path_replacement | string | Sets the path in the Location header value after rewriting. |
{
"HTTPRewriteRespURL": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field_group name is provided:
{
"HTTPRewriteRespURL": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"HTTPRewriteRespURL": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
{
"msg": <success-or-error-msg>
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"HTTPRewriteRespURL": {
"instance_id":<instance_id>,
"service":<value>
}
}