Skip to content

Commit

Permalink
Update pdk
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianrbz committed Dec 4, 2024
1 parent 9417f5a commit 1d88494
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
29 changes: 29 additions & 0 deletions app/_src/gateway/plugin-development/pdk/kong.client.tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
2 changes: 1 addition & 1 deletion app/_src/gateway/plugin-development/pdk/kong.log.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```


Expand Down
29 changes: 29 additions & 0 deletions app/_src/gateway/plugin-development/pdk/kong.service.request.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1d88494

Please sign in to comment.