gpt4 book ai didi

open-policy-agent - 无法使用 http.send 请求资源

转载 作者:行者123 更新时间:2023-12-05 02:07:12 25 4
gpt4 key购买 nike

当我运行以下代码时:

data := response {
response := http.send({
"method" : "GET",
"url": "https://httpbin.org/status/200"
})
}

我收到这个错误:

1 error occurred: policy.rego:4: rego_type_error: unsafe built-in function calls in expression: http.send

我正在使用 rego play 来运行该策略。 https://play.openpolicyagent.org/p/iqK8Zt5L62

最佳答案

我认为这是 playground 特有的,因为允许从那里发送任意 HTTP 请求可能会被滥用。您的规则在任何其他情况下都应该可以正常工作。

关于open-policy-agent - 无法使用 http.send 请求资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62047639/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com