Open naanlizard opened 5 months ago
@naanlizard Thank you. I will have to think about this due to the additional complexity, and this feature might have lower priority on my list (sorry). On the other hand, I wonder if your true concern is the burden to maintain consistency across multiple configuration files, which I deeply sympathize! If so, I think tools like conf might help.
@naanlizard I wonder if you have tried the tool I suggested?
In the meanwhile, I might have come up with a good solution. I wonder if you are okay with writing a regular expression to identify the token? You will need to write a regular expression and the first submatch named token
will be used as the API token. For example, the regular expression to use the whole file is
^(?<token>.*)$
Design question: the first config name that comes to my mind is ridiculously long: CF_API_TOKEN_FILE_CONTENT_REGEX
@naanlizard Hi, I have been trying various experiments and wonder how you feel about the design. BTW, I think the idea "first submatched named token
" is overkill. It should just be "first numbered capture group". So the regular expression to match the whole file is just
^(.*)$
and it should probably be CF_API_TOKEN_REGEX
for the whole file.
I'm sorry to be so quiet here - for the moment I can't play with this, but in a few weeks I'll be redoing one of my sites and can go in depth then!
Small issue here, other services (letsencrypt and stuff using it) tend to use cloudflare's API key in the form of
https://certbot-dns-cloudflare.readthedocs.io/en/stable/
would it be possible to add support for that formatting so I don't need as many files kicking around?
Originally posted by @naanlizard in https://github.com/favonia/cloudflare-ddns/issues/668#issuecomment-2002118821