Skip to content

Commit 3a8d6b8

Browse files
authored
docs: Update OPA Policy Configuration with Example (#12840)
1 parent 9cca42e commit 3a8d6b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/en/latest/plugins/opa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The `opa` Plugin can be used to integrate with [Open Policy Agent (OPA)](https:/
3838
|-------------------|---------|----------|---------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3939
| host | string | True | | | Host address of the OPA service. For example, `https://localhost:8181`. |
4040
| ssl_verify | boolean | False | true | | When set to `true` verifies the SSL certificates. |
41-
| policy | string | True | | | OPA policy path. A combination of `package` and `decision`. While using advanced features like custom response, you can omit `decision`. |
41+
| policy | string | True | | | OPA policy path. A combination of `package` and `decision`. While using advanced features like custom response, you can omit `decision`. When specifying a namespace, use the slash format (`examples/echo`) instead of dot notation (`examples.echo`). |
4242
| timeout | integer | False | 3000ms | [1, 60000]ms | Timeout for the HTTP call. |
4343
| keepalive | boolean | False | true | | When set to `true`, keeps the connection alive for multiple requests. |
4444
| keepalive_timeout | integer | False | 60000ms | [1000, ...]ms | Idle time after which the connection is closed. |

docs/zh/latest/plugins/opa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ description: 本篇文档介绍了 Apache APISIX 通过 opa 插件与 Open Polic
3838
|-------------------|---------|----------|---------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3939
| host | string || | | OPA 服务的主机地址,例如 `https://localhost:8181`|
4040
| ssl_verify | boolean || true | | 当设置为 `true` 时,将验证 SSL 证书。 |
41-
| policy | string || | | OPA 策略路径,是 `package``decision` 配置的组合。当使用高级功能(如自定义响应)时,你可以省略 `decision` 配置。 |
41+
| policy | string || | | OPA 策略路径,是 `package``decision` 配置的组合。当使用高级功能(如自定义响应)时,你可以省略 `decision` 配置。指定命名空间时,请使用斜杠格式(例如 `examples/echo`),而不是点号格式(例如 `examples.echo`)。 |
4242
| timeout | integer || 3000ms | [1, 60000]ms | 设置 HTTP 调用超时时间。 |
4343
| keepalive | boolean || true | | 当设置为 `true` 时,将为多个请求保持连接并处于活动状态。 |
4444
| keepalive_timeout | integer || 60000ms | [1000, ...]ms | 连接断开后的闲置时间。 |

0 commit comments

Comments
 (0)