.. _slb_template_http: slb template http ================= HTTP http Specification ------------------ ===================================== ================================================================= **Parameter** **Value** ===================================== ================================================================= **Type** *Collection* **Object Key(s)** *name* **Collection Name** :ref:`2955_http_list` **Collection URI** /axapi/v3/slb/template/http **Element Name** http **Element URI** /axapi/v3/slb/template/http/{name} **Element Attributes** http_attributes **Partition Visibility** shared **Schema** :download:`http schema ` ===================================== ================================================================= **Operations Allowed:** .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html .. raw:: html
OperationMethodURIPayload
Create Object .. raw:: html POST .. raw:: html /axapi/v3/slb/template/http .. raw:: html :ref:`2955_http_attributes` .. raw:: html
Create List .. raw:: html POST .. raw:: html /axapi/v3/slb/template/http .. raw:: html :ref:`2955_http_attributes` .. raw:: html
Get Object .. raw:: html GET .. raw:: html /axapi/v3/slb/template/http/{name} .. raw:: html :ref:`2955_http_attributes` .. raw:: html
Get List .. raw:: html GET .. raw:: html /axapi/v3/slb/template/http .. raw:: html :ref:`2955_http_list` .. raw:: html
Modify Object .. raw:: html POST .. raw:: html /axapi/v3/slb/template/http/{name} .. raw:: html :ref:`2955_http_attributes` .. raw:: html
Replace Object .. raw:: html PUT .. raw:: html /axapi/v3/slb/template/http/{name} .. raw:: html :ref:`2955_http_attributes` .. raw:: html
Replace List .. raw:: html PUT .. raw:: html /axapi/v3/slb/template/http .. raw:: html :ref:`2955_http_list` .. raw:: html
Delete Object .. raw:: html DELETE .. raw:: html /axapi/v3/slb/template/http/{name} .. raw:: html :ref:`2955_http_attributes` .. raw:: html
.. _2955_http_list: http-list --------- http-list is **JSON List** of :ref:`2955_http_attributes` http-list : [ { :ref:`2955_http_attributes` }, { :ref:`2955_http_attributes` }, ... ] .. _2955_http_attributes: http attributes --------------- **100-cont-wait-for-req-complete** **Description** When REQ has Expect 100 and response is not 100, then wait for whole request to be sent **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **allowed-methods** **Description** Enable allowed-method check (List of allowed HTTP methods) **Type:** string **Format:** string-rlx **Maximum Length:** 1023 characters **Maximum Length:** 1 characters **Mutual Exclusion:** allowed-methods and disallowed-methods are mutually exclusive **allowed-methods-action** **Description** 'drop': Respond 400 directly; **Type:** string **Supported Values:** drop **Default:** drop **bypass-sg** **Description** Select service group for non-http traffic (Service Group Name) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **Reference Object:** :doc:`/axapi/v3/slb/service-group ` **client-idle-timeout** **Description** Client session timeout if the next request is not received (timeout in seconds. 0 means disable, default is 0) **Type:** number **Range:** 0-120 **Default:** 0 **client-ip-hdr-replace** **Description** Replace the existing header **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **client-port-hdr-replace** **Description** Replace the existing header **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **compression-auto-disable-on-high-cpu** **Description** Auto-disable software compression on high cpu usage (Disable compression if cpu usage is above threshold. Default is off.) **Type:** number **Range:** 1-100 **compression-br-level** **Description** brotli compression level, default 1 (brotli compression level value, default is 1) **Type:** number **Range:** 1-9 **Default:** 1 **compression-br-sliding-window-size** **Description** brotli compression sliding window size, default 10 (brotli compression sliding window size in the form of log (i.e., 10 means 1k-16MB bytes)) **Type:** number **Range:** 10-24 **compression-content-type** **Type:** List **compression-enable** **Description** Enable Compression **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **compression-exclude-content-type** **Type:** List **compression-exclude-uri** **Type:** List **compression-keep-accept-encoding** **Description** Keep accept encoding **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **compression-keep-accept-encoding-enable** **Description** Enable Server Accept Encoding **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **compression-level** **Description** gzip compression level, default 1 (gzip compression level value, default is 1) **Type:** number **Range:** 1-9 **Default:** 1 **compression-method-order** **Description** Method Order (Order to decide which compression algorithm to be applied when multiple algorithms are acceptable) **Type:** string **Format:** string-rlx **Maximum Length:** 11 characters **Maximum Length:** 11 characters **compression-minimum-content-length** **Description** Minimum Content Length (Minimum content length for compression in bytes. Default is 120.) **Type:** number **Range:** 1-2147483647 **Default:** 120 **cookie-format** **Description** 'rfc6265': Follow rfc6265; **Type:** string **Supported Values:** rfc6265 **cookie-samesite** **Description** 'none': none; 'lax': lax; 'strict': strict; **Type:** string **Supported Values:** none, lax, strict **default-charset** **Description** 'iso-8859-1': Use ISO-8859-1 as the default charset; 'utf-8': Use UTF-8 as the default charset; 'us-ascii': Use US-ASCII as the default charset; **Type:** string **Supported Values:** iso-8859-1, utf-8, us-ascii **Default:** utf-8 **disallowed-methods** **Description** Enable disallowed-method check (List of disallowed HTTP methods) **Type:** string **Format:** string-rlx **Maximum Length:** 1023 characters **Maximum Length:** 1 characters **Mutual Exclusion:** disallowed-methods and allowed-methods are mutually exclusive **disallowed-methods-action** **Description** 'drop': Respond 400 directly; **Type:** string **Supported Values:** drop **Default:** drop **failover-url** **Description** Failover to this URL (Failover URL Name) **Type:** string **Format:** string-rlx **Maximum Length:** 255 characters **Maximum Length:** 1 characters **frame-limit** **Description** Limit the number of CONTINUATION, PING, PRIORITY, RESET, SETTINGS and empty frames in one HTTP2 connection, default 10000 **Type:** number **Range:** 0-65535 **Default:** 10000 **host-switching** **Type:** List **http-protocol-check** **Description:** http-protocol-check is a **JSON Block**. Please see below for :ref:`2955_http-protocol-check` **Type:** Object **Reference Object:** :doc:`/axapi/v3/slb/template/http/{name}/http-protocol-check ` **http2-client-no-snat** **Description** Set max-concurrent-stream = 1 when the client side is HTTP2 and no source-nat configuration is under vport **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **insert-client-ip** **Description** Insert Client IP address into HTTP header **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **insert-client-ip-header-name** **Description** HTTP Header Name for inserting Client IP **Type:** string **Maximum Length:** 63 characters **Maximum Length:** 1 characters **insert-client-port** **Description** Insert Client Port address into HTTP header **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **insert-client-port-header-name** **Description** HTTP Header Name for inserting Client Port **Type:** string **Maximum Length:** 63 characters **Maximum Length:** 1 characters **keep-client-alive** **Description** Keep client alive **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **log-retry** **Description** log when HTTP request retry **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **max-concurrent-streams** **Description** (http2 only) Max concurrent streams, default 50 **Type:** number **Range:** 1-1000 **Default:** 50 **name** **Description** HTTP Template Name **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **non-http-bypass** **Description** Bypass non-http traffic instead of dropping **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **persist-on-401** **Description** Persist to the same server if the response code is 401 **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **prefix** **Description** 'host': the cookie will have been set with a Secure attribute, a Path attribute with a value of /, and no Domain attribute; 'secure': the cookie will have been set with a Secure attribute; 'check': check server prefix and enforce prefix format; **Type:** string **Supported Values:** host, secure, check **rd-port** **Description** Port (Port Number) **Type:** number **Range:** 1-65535 **Mutual Exclusion:** rd-port and rd-simple-loc are mutually exclusive **rd-resp-code** **Description** '301': Moved Permanently; '302': Found; '303': See Other; '307': Temporary Redirect; **Type:** string **Supported Values:** 301, 302, 303, 307 **rd-secure** **Description** Use HTTPS **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **Mutual Exclusion:** rd-secure and rd-simple-loc are mutually exclusive **rd-simple-loc** **Description** Redirect location tag absolute URI string **Type:** string **Format:** string-rlx **Maximum Length:** 255 characters **Maximum Length:** 1 characters **Mutual Exclusion:** rd-simple-loc, rd-secure, and rd-port are mutually exclusive **redirect** **Description** Automatically send a redirect response **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **redirect-rewrite** **Description:** redirect-rewrite is a **JSON Block**. Please see below for :ref:`2955_redirect-rewrite` **Type:** Object **req-hdr-wait-time** **Description** HTTP request header wait time before abort connection **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **req-hdr-wait-time-val** **Description** Number of seconds wait for client request header (default is 7) **Type:** number **Range:** 1-31 **Default:** 7 **request-header-erase-list** **Type:** List **request-header-insert-list** **Type:** List **request-line-case-insensitive** **Description** Parse http request line as case insensitive **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **request-timeout** **Description** Request timeout if response not received (timeout in seconds) **Type:** number **Range:** 1-120 **response-content-replace-list** **Type:** List **response-header-erase-list** **Type:** List **response-header-insert-list** **Type:** List **retry-on-5xx** **Description** Retry http request on HTTP 5xx code and request timeout **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **Mutual Exclusion:** retry-on-5xx and retry-on-5xx-per-req are mutually exclusive **retry-on-5xx-per-req** **Description** Retry http request on HTTP 5xx code for each request **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **Mutual Exclusion:** retry-on-5xx-per-req and retry-on-5xx are mutually exclusive **retry-on-5xx-per-req-val** **Description** Number of times to retry (default is 3) **Type:** number **Range:** 1-3 **Default:** 3 **retry-on-5xx-val** **Description** Number of times to retry (default is 3) **Type:** number **Range:** 1-3 **Default:** 3 **server-support-http2-only** **Description** Notify the vport regarding whether server supports http2 only **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **server-support-http2-only-value** **Description** 'auto-detect': Commuincate with the server via HTTP/2 when an support-http2-only rport is detected; 'force': Communicate with the server via HTTP/2 when possible; **Type:** string **Supported Values:** auto-detect, force **Default:** auto-detect **strict-transaction-switch** **Description** Force server selection on every HTTP request **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **template** **Description:** template is a **JSON Block**. Please see below for :ref:`2955_template` **Type:** Object **term-11client-hdr-conn-close** **Description** Terminate HTTP 1.1 client when req has Connection: close **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **url-hash-first** **Description** Use the begining part of URL to calculate hash value (URL string length to calculate hash value) **Type:** number **Range:** 4-128 **Mutual Exclusion:** url-hash-first and url-hash-last are mutually exclusive **url-hash-last** **Description** Use the end part of URL to calculate hash value (URL string length to calculate hash value) **Type:** number **Range:** 4-128 **Mutual Exclusion:** url-hash-last and url-hash-first are mutually exclusive **url-hash-offset** **Description** Skip part of URL to calculate hash value (Offset of the URL string) **Type:** number **Range:** 0-255 **url-hash-persist** **Description** Use URL's hash value to select server **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **url-switching** **Type:** List **use-server-status** **Description** Use Server-Status header to do URL hashing **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **user-tag** **Description** Customized tag **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **uuid** **Description** uuid of the object **Type:** string **Maximum Length:** 64 characters **Maximum Length:** 1 characters .. _2955_request-header-erase-list: request-header-erase-list ^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **request-header-erase** **Description** Erase a header from HTTP request (Header Name) **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters .. _2955_redirect-rewrite: redirect-rewrite ^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *object* =============================== =================================================== **match-list** **Type:** List **redirect-secure** **Description** Use HTTPS **Type:** boolean **Supported Values:** true, false, 1, 0 **Default:** 0 **redirect-secure-port** **Description** Port (Port Number) **Type:** number **Range:** 1-65535 **Default:** 443 .. _2955_redirect-rewrite_match-list: redirect-rewrite_match-list ^^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **redirect-match** **Description** URL Matching (Pattern URL String) **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters **rewrite-to** **Description** Rewrite to Destination URL String **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters .. _2955_host-switching: host-switching ^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **host-match-string** **Description** Hostname String **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters **host-service-group** **Description** Create a Service Group comprising Servers (Service Group Name) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **Reference Object:** :doc:`/axapi/v3/slb/service-group ` **host-switching-type** **Description** 'contains': Select service group if hostname contains another string; 'ends-with': Select service group if hostname ends with another string; 'equals': Select service group if hostname equals another string; 'starts-with': Select service group if hostname starts with another string; 'regex-match': Select service group if URL string matches with regular expression; 'host-hits-enable': Enables Host Hits counters; **Type:** string **Supported Values:** contains, ends-with, equals, starts-with, regex-match, host-hits-enable .. _2955_response-header-insert-list: response-header-insert-list ^^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **response-header-insert** **Description** Insert a header into HTTP response (Header Content (Format: "[name]:[value]")) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **response-header-insert-type** **Description** 'insert-if-not-exist': Only insert the header when it does not exist; 'insert-always': Always insert the header even when there is a header with the same name; **Type:** string **Supported Values:** insert-if-not-exist, insert-always .. _2955_response-header-erase-list: response-header-erase-list ^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **response-header-erase** **Description** Erase a header from HTTP response (Header Name) **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters .. _2955_template: template ^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *object* =============================== =================================================== **logging** **Description** Logging template (Logging Config name) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **Reference Object:** :doc:`/axapi/v3/slb/template/logging ` .. _2955_url-switching: url-switching ^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **url-match-string** **Description** URL String **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters **url-service-group** **Description** Create a Service Group comprising Servers (Service Group Name) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **Reference Object:** :doc:`/axapi/v3/slb/service-group ` **url-switching-type** **Description** 'contains': Select service group if URL string contains another string; 'ends-with': Select service group if URL string ends with another string; 'equals': Select service group if URL string equals another string; 'starts-with': Select service group if URL string starts with another string; 'regex-match': Select service group if URL string matches with regular expression; 'url-case-insensitive': Case insensitive URL switching; 'url-hits-enable': Enables URL Hits; **Type:** string **Supported Values:** contains, ends-with, equals, starts-with, regex-match, url-case-insensitive, url-hits-enable .. _2955_response-content-replace-list: response-content-replace-list ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **response-content-replace** **Description** replace the data from HTTP response content (String in the http content need to be replaced) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **response-new-string** **Description** String will be in the http content **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters .. _2955_http-protocol-check: http-protocol-check ^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *object* =============================== =================================================== **get-and-payload** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **h2up-content-length-alias** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **h2up-with-host-and-auth** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **h2up-with-transfer-encoding** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **header-filter-rule-list** **Type:** List **Reference Object:** :doc:`/axapi/v3/slb/template/http/{name}/http-protocol-check/header-filter-rule/{seq-num} ` **malformed-h2up-header-value** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **malformed-h2up-scheme-value** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **multiple-content-length** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **multiple-transfer-encoding** **Description** 'drop': Drop the request and send 400 to the client side; **Type:** string **Supported Values:** drop **transfer-encoding-and-content-length** **Description** 'drop': Drop the request and Send 400 to the client side; **Type:** string **Supported Values:** drop **uuid** **Description** uuid of the object **Type:** string **Maximum Length:** 64 characters **Maximum Length:** 1 characters .. _2955_http-protocol-check_header-filter-rule-list: http-protocol-check_header-filter-rule-list ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **action-value** **Description** 'drop': Drop the request; **Type:** string **Supported Values:** drop **header-name-value** **Description** Header name value **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters **header-value-value** **Description** Header value **Type:** string **Format:** string-rlx **Maximum Length:** 63 characters **Maximum Length:** 1 characters **match-type-value** **Description** 'full-text': Full text match; 'pcre': PCRE match; **Type:** string **Supported Values:** full-text, pcre **seq-num** **Description** Specify a sequence number **Type:** number **Range:** 0-4 **user-tag** **Description** Customized tag **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **uuid** **Description** uuid of the object **Type:** string **Maximum Length:** 64 characters **Maximum Length:** 1 characters .. _2955_request-header-insert-list: request-header-insert-list ^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **request-header-insert** **Description** Insert a header into HTTP request (Header Content (Format: "[name]:[value]")) **Type:** string **Format:** string-rlx **Maximum Length:** 127 characters **Maximum Length:** 1 characters **request-header-insert-type** **Description** 'insert-if-not-exist': Only insert the header when it does not exist; 'insert-always': Always insert the header even when there is a header with the same name; **Type:** string **Supported Values:** insert-if-not-exist, insert-always .. _2955_compression-content-type: compression-content-type ^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **content-type** **Description** Compression content-type **Type:** string **Format:** string-rlx **Maximum Length:** 31 characters **Maximum Length:** 1 characters .. _2955_compression-exclude-uri: compression-exclude-uri ^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **exclude-uri** **Description** Compression exclude uri **Type:** string **Format:** string-rlx **Maximum Length:** 31 characters **Maximum Length:** 1 characters .. _2955_compression-exclude-content-type: compression-exclude-content-type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ =============================== =================================================== **Specification** **Value** =============================== =================================================== **Type** *list* **Block object keys** =============================== =================================================== **exclude-content-type** **Description** Compression exclude content-type (Compression exclude content type) **Type:** string **Format:** string-rlx **Maximum Length:** 31 characters **Maximum Length:** 1 characters