From 1d884945293c81c9678323d1a85fbacd634212c0 Mon Sep 17 00:00:00 2001 From: Fabian Rodriguez Date: Fri, 29 Nov 2024 12:12:55 +0100 Subject: [PATCH] Update pdk --- .../plugin-development/pdk/kong.client.tls.md | 29 +++++++++++++++++++ .../plugin-development/pdk/kong.log.md | 2 +- .../pdk/kong.service.request.md | 29 +++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/app/_src/gateway/plugin-development/pdk/kong.client.tls.md b/app/_src/gateway/plugin-development/pdk/kong.client.tls.md index f1f1d923da4f..e8d6fa18f046 100644 --- a/app/_src/gateway/plugin-development/pdk/kong.client.tls.md +++ b/app/_src/gateway/plugin-development/pdk/kong.client.tls.md @@ -193,3 +193,32 @@ Overrides the client's verification result generated by the log serializer. ``` lua kong.client.tls.set_client_verify("FAILED:unknown CA") ``` + +{% if_version lte:3.9.x %} + +## kong.client.tls.disable_http2_alpn() + +Prevents the TLS handshake from negotiating HTTP/2 ALPN. + if successful, the TLS handshake will not negotiate HTTP/2 ALPN to turn to HTTP1.1. + + +**Phases** + +* client_hello + +**Returns** + +1. `true|nil`: Returns `true` if successful, `nil` if it fails. + +1. `nil|err`: Returns `nil` if successful, or an error message if it fails. + + +**Usage** + +``` lua +local res, err = kong.client.tls.disable_http2_alpn() +if not res then + -- do something with err +end +``` +{% endif_version %} diff --git a/app/_src/gateway/plugin-development/pdk/kong.log.md b/app/_src/gateway/plugin-development/pdk/kong.log.md index 6e115d678208..c3b188eaad19 100644 --- a/app/_src/gateway/plugin-development/pdk/kong.log.md +++ b/app/_src/gateway/plugin-development/pdk/kong.log.md @@ -384,7 +384,7 @@ assert(kong.log.serialize().my_new_value == nil) -- Dots in the key are interpreted as table accesses kong.log.set_serialize_value("my.new.value", 4) -assert(kong.log.serialize().my.new_value == 4) +assert(kong.log.serialize().my.new.value == 4) ``` diff --git a/app/_src/gateway/plugin-development/pdk/kong.service.request.md b/app/_src/gateway/plugin-development/pdk/kong.service.request.md index 93d27e0bed96..f1ff419ae8d2 100644 --- a/app/_src/gateway/plugin-development/pdk/kong.service.request.md +++ b/app/_src/gateway/plugin-development/pdk/kong.service.request.md @@ -214,6 +214,35 @@ kong.service.request.set_query({ ``` +{% if_version gte:3.9.x %} + +## kong.service.request.clear_query_arg(name) + +Removes all occurrences of the specified query string argument + from the request to the Service. The order of query string + arguments is retained. + + +**Phases** + +* `rewrite`, `access` + +**Parameters** + +* **name** (`string`): + +**Returns** + +* Nothing; throws an error on invalid inputs. + + +**Usage** + +``` lua +kong.service.request.clear_query_arg("foo") +``` + +{% endif_version %} ## kong.service.request.set_header(header, value)