我想根据环境代理到不同的 api - 我已经尝试了以下主题的一些变体,但没有任何运气。如果可能的话,这样做的正确方法是什么?
[build.environment]
API_URI="https://dev-api.foo.com/:splat"
[context.production.environment]
API_URI="https://prod-api.foo.com/:splat"
[[redirects]]
from = "/api/*"
to = "$API_URI"
status = 200
force = true
这不起作用。
虽然上面的配置在我将 URI 硬编码到to
字段中时有效,但当我尝试插入 env var 时它就失败了。