Mostly a settings fix + examples on resterm.app/examples.
Settings fix
insecure and http-insecure are the same setting. So are http-root-ca and http-root-cas, and grpc-root-ca and grpc-root-cas. Settings stack: the request beats the file and the file beats the environment. That only worked when every layer used the same name.
Say your dev environment turns certificate checks off, and one request turns them back on:
{
"dev": {
"settings.insecure": "true"
}
}### Payments health
# @name health
# @setting http-insecure false
GET https://localhost:8443/healthPrevious versions always let insecure win, wherever it was set. The certificate was never checked:
Name: health
Request: GET https://localhost:8443/health
Environment: dev
Status: 200 OK
Now the request-level setting wins, and TLS verification fails as expected::
Errors:
Request error:
error[tls]: request failed
perform request
╰─> Get "https://localhost:8443/health"
╰─> tls: failed to verify certificate
╰─> x509: “localhost” certificate is not trusted
Other places that follow the order now:
$sharedis the lowest layer."settings.http-insecure"in an environment overrides"settings.insecure"in$shared.- An
@applypatch sits above the request, and anullin it removes both names from the request. - SSE and WebSocket requests use the same rules.
The full layer order is on the HTTP settings page.
Both names in one place
When one layer sets both names, Resterm can't know which one you meant, so the request stops with exit code 26:
error[protocol]: http-insecure and insecure are the same setting. Use one of them.
Before, insecure would win. The request still runs if a higher layer sets the value, or an @apply patch removes it. With grouped environments you'll get the same error when profiles from two groups each set one of the names. The grpc- pair only stops gRPC requests.
Variables in proxy
# @setting proxy {{proxy.url}}Older versions didn't expand this and refused to send the request:
error[protocol]: invalid proxy "{{proxy.url}}" (use a URL such as http://host:8080)
Variables now work in request-level proxy settings, file defaults, and settings.proxy in environment files. If the variable isn't defined, nothing is sent and you get expand proxy: undefined variable: proxy.url.
Examples
All examples are now mirrored on the web: resterm.app/examples
Upgrading
- Look for files and environments that set both
insecureandhttp-insecurein the same place, or both names of a root CA setting. Keep one. - If a request starts failing TLS checks after the update, check its certificate or CA path. That check was being skipped before.
Coming from something older than 1.18.1? Read the 1.18.1 and 1.18.0 notes.