Re: curl config file based on domain or inline variables based on request
Daniel Stenberg via curl-users <[email protected]> Thu, 11 Dec 2025 13:04:41 +0100 (CET)
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 11 Dec 2025, Bastian Jesuiter via curl-users wrote:
> The curlrc would include the a header with a {{ domain }} like variable
> syntax.
>
> Like:
> header @path/{{domain}}.txt
>
> Where the domain will be inferred by the given domain in the command.
I like this idea! Let me also mention that we have a similar idea listed in
the TODO:
https://curl.se/docs/todo.html#hostname-sections-in-config-files
It would get roughly the same thing with a syntax like this:
[domain]
header @path/special.txt
I think both takes could be worth exploring. They have roughly the same
challenge: they make it necessary to parse the config file (again?) after each
URL has been retrieved, so that it knows the domain.
--
/ daniel.haxx.se || https://rock-solid.curl.dev
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html