# OpenFunction 配置选项

OpenFunction 插件将网关请求转发至同步 OpenFunction 端点，支持可选的 Basic 认证和路径保留。<!-- --> <!-- -->配置涵盖插件参数。

## 参数[​](#参数 "参数的直接链接")

有关所有插件均可使用的配置项，请参阅插件[通用配置](https://docs.apiseven.com/apisix/reference/plugin-common-configurations.md)。

* function\_uri

  string

  必填

  ***

  同步 OpenFunction 端点的 URI。通配符路由后缀会附加到此 URI。无路径的端点使用 `/`；无路径支持在 API7 Enterprise 3.9.20 和 3.10.7 以及 APISIX 3.19.0 中引入。

* authorization

  object

  ***

  添加到函数请求的 Basic 认证。

  * service\_token

    string

    ***

    编码到 Basic `Authorization` 请求头中的值。该值会替换客户端提供的任何 Authorization 请求头；省略时，客户端 Authorization 请求头将原样转发。API7 Gateway 使用 AES 对该值进行静态加密。启用字段加密时，APISIX 在将其存储到 etcd 前加密。

* max\_req\_body\_size

  integer

  默认值：`67108864`

  有效值：

  大于或等于 1

  ***

  在内存中缓冲的最大请求体大小。请求体超过该大小时返回 `400 Bad Request`。该配置在 API7 Enterprise 3.9.17 和 3.10.4 以及 APISIX 3.18.0 中引入。

* timeout

  integer

  默认值：`3000`

  有效值：

  大于或等于 100

  ***

  函数请求超时时间，单位为毫秒。

* ssl\_verify

  boolean

  默认值：`true`

  ***

  为 true 时，验证函数端点的 TLS 证书。

* keepalive

  boolean

  默认值：`true`

  ***

  为 true 时，保持函数连接以便复用。

* keepalive\_timeout

  integer

  默认值：`60000`

  有效值：

  大于或等于 1000

  ***

  空闲长连接超时时间，单位为毫秒。

* keepalive\_pool

  integer

  默认值：`5`

  有效值：

  大于或等于 1

  ***

  长连接池中的最大连接数。
