AlinsRan opened a new pull request, #13540:
URL: https://github.com/apache/apisix/pull/13540
### Description
In standalone mode there are two config sources:
- **file** (`apisix.yaml`) — `${{VAR}}` / `$ENV://` references are resolved
in `config_yaml.parse()`.
- **Admin API** (`PUT /apisix/admin/configs`) — the JSON body is decoded
straight into `config_yaml._update_config()`, which no longer resolves those
references, so they are kept literal.
This restores resolution for the Admin API path:
`apisix/admin/standalone.lua` now calls `file.resolve_conf_var(config)` before
applying the pushed config, so both sources behave consistently. Because the
Admin API body is JSON (already typed), table-level resolution does not
reintroduce the YAML type-inference issue that motivated moving resolution to
parse time.
### Test
Adds a case to `t/admin/standalone.spec.ts`: push a route whose
`proxy-rewrite.uri` is `${{STANDALONE_ENV_TEST:=/hello}}` and assert the route
returns the hello body (the reference was resolved to its default; a literal
value would not match).
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [x] I have updated the documentation to reflect this change (N/A)
- [x] I have verified that the changes pass the existing tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]