| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | service | asso | |
| default | resp_https | boolean | Rewrites protocol in the Location header of HTTP redirect responses to HTTPS. |
| default | req_url_rules | asso | |
| default | resp_url_rules | asso | |
| default | insert_req_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| default | insert_rsp_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| default | remove_req_headers | ListField | |
| default | remove_resp_headers | ListField | |
| default | resp_cookie_secure | boolean | This setting enables the system to add the "; secure" clause to the Set-Cookie header in the HTTP response. |
| default | resp_cookie_secure_icookie | boolean | This setting enables the system to add the "; secure" clause to the inserted Set-Cookie header in the HTTP response. |
| default | remove_resp_port | boolean | This setting enables the system to remove the port number contained in the Location header in the HTTP response. |
| default | resp_cache_control | boolean | This setting enables the system to insert a Cache-Control header to set the cache directives for the client. |
| default | resp_cache_control_rules | asso |
{
"HTTPRewriteSettings": {
"meta": {
"abstract": false,
"verbose_name": Per Virtual Service HTTP Rewrite Settings,
},
"fieldgroups": [
{
"fields": [
{
"verbose_name": field_verbose_name1,
"field_name": field_name1
},
...
],
"group_name": field_group_name1
},
...
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description | |||
|---|---|---|---|---|---|
| resp_https | boolean | Rewrites protocol in the Location header of HTTP redirect responses to HTTPS. | |||
| insert_req_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
|||
| insert_rsp_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
|||
| remove_req_headers | ListField (Nested Field. It should be a dict.)
|
||||
| remove_resp_headers | ListField (Nested Field. It should be a dict.)
|
||||
| resp_cookie_secure | boolean | This setting enables the system to add the "; secure" clause to the Set-Cookie header in the HTTP response. | |||
| resp_cookie_secure_icookie | boolean | This setting enables the system to add the "; secure" clause to the inserted Set-Cookie header in the HTTP response. | |||
| remove_resp_port | boolean | This setting enables the system to remove the port number contained in the Location header in the HTTP response. | |||
| resp_cache_control | boolean | This setting enables the system to insert a Cache-Control header to set the cache directives for the client. |
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"HTTPRewriteSettings": [
{
"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, resp_https, req_url_rules, resp_url_rules, insert_req_header, insert_rsp_header, remove_req_headers, remove_resp_headers, resp_cookie_secure, resp_cookie_secure_icookie, remove_resp_port, resp_cache_control, resp_cache_control_rules, 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 | resp_https | boolean | Rewrites protocol in the Location header of HTTP redirect responses to HTTPS. |
| default | req_url_rules | asso | |
| default | resp_url_rules | asso | |
| default | insert_req_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| default | insert_rsp_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| default | remove_req_headers | ListField | |
| default | remove_resp_headers | ListField | |
| default | resp_cookie_secure | boolean | This setting enables the system to add the "; secure" clause to the Set-Cookie header in the HTTP response. |
| default | resp_cookie_secure_icookie | boolean | This setting enables the system to add the "; secure" clause to the inserted Set-Cookie header in the HTTP response. |
| default | remove_resp_port | boolean | This setting enables the system to remove the port number contained in the Location header in the HTTP response. |
| default | resp_cache_control | boolean | This setting enables the system to insert a Cache-Control header to set the cache directives for the client. |
| default | resp_cache_control_rules | asso |
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field_group name is provided:
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
{
"msg": <success-or-error-msg>
}
{
<field_name>:<value>
}
When field name is not specified in URL:
Notice: The fields not provided are left untouched.
{
<field_name1>:<value1>,
<field_name2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_name | URI | (optional) Target field name to update. Available field names are: resp_https, insert_req_header, insert_rsp_header, remove_req_headers, remove_resp_headers, resp_cookie_secure, resp_cookie_secure_icookie, remove_resp_port, resp_cache_control, |
| Field Name | Type | Description |
|---|---|---|
| resp_https | boolean | Rewrites protocol in the Location header of HTTP redirect responses to HTTPS. |
| insert_req_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| insert_rsp_header | string | The symbols to configure header string are as follows: %n line separator (replaced by \r\n) %q double quote (") %% the percent symbol itself |
| remove_req_headers | ListField | |
| remove_resp_headers | ListField | |
| resp_cookie_secure | boolean | This setting enables the system to add the "; secure" clause to the Set-Cookie header in the HTTP response. |
| resp_cookie_secure_icookie | boolean | This setting enables the system to add the "; secure" clause to the inserted Set-Cookie header in the HTTP response. |
| remove_resp_port | boolean | This setting enables the system to remove the port number contained in the Location header in the HTTP response. |
| resp_cache_control | boolean | This setting enables the system to insert a Cache-Control header to set the cache directives for the client. |
All configuration fields and their values are replied:
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
<field_group1>: {
<field3>:<value3>,
<field4>:<value4>,
...
},
<field_group2>: {
<field5>:<value5>,
<field6>:<value6>,
...
},
...
}
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
"req_url_rules":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| name | string | |
| priority | uint32 | |
| orig_host | string | Sets the string used to match the value of the Host header in the request. |
| path_regex | string | Sets the string used to match the path part of the HTTP request line. |
| new_host | string | Sets the value of the Host header in the HTTP request after rewriting. |
| path_replacement | string | Sets the path part of the request line in the HTTP request after rewriting. |
{
"HTTPRewriteReqURL": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"msg": <success-or-error-msg>
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
"resp_url_rules":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| 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>,
...
}
}
{
"msg": <success-or-error-msg>
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"HTTPRewriteSettings": {
"instance_id":<instance_id>,
"resp_cache_control_rules":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| regex | string | |
| cache_directives | ListField | |
| priority | int |
{
"HTTPRewriteRespCacheControlRule": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"msg": <success-or-error-msg>
}