Closed marceloaf closed 5 months ago
This is currently not possible, but is probably a good idea, as custom HTTP headers can be useful in a multitude of situations.
Text settings parameter contains extra HTTP headers.
<field-name>:<field-content>
\n
in text or '\n' in JSON... "httpHeaders": "CF-Access-Client-Id: bd2744144725d2651d39363df6807599.access.owntracks.org\nCF-Access-Client-Secret: 3e2c2ad371b00777a443f0c639c103687e4fcf73e0c3371cb1cbd6" ...
An upcoming version will have a new setting httpHeaders
which allows us to specify any number of headers which will be transmitted along with the HTTP request.
The following example configures three distinct headers (note the newline separator):
which arrive at the HTTP endpoint as:
Content-Type: application/json
CF-Access-Client-Secret: 3e2blabla
CF-Access-Client-Id: bd.access.owntracks.org
myname: JP
User-Agent: OwnTracks/17.1.0 CFNetwork/1410.0.3 Darwin/22.6.0
X-Limit-D: http-i3
X-Limit-U: jpm
@marceloaf here is the link to a public beta of the new version. It would be highly appreciated if you test to connect to your backend via Cloudflare and leave your feedback here.
Very cool guys! Apparently, it's working perfectly! ☺
Just sent a manual update at 16:19 my time and HA received it correctly! I'll leave now to do some errands and to do some further tests. Thank you very much!
I had done a small donation earlier today, but as I was not used to the platform it apparently split the value throughout the year... :-( My intent was to do it immediately! Anyways...
Much appreciated, thank you!
Hi. Hope this finds you well.
My Home Assistant installation is behind Cloudflare with Service Token. When I access the webhook url in my HA I need to pass the clientid and clientsecret as headers. Is it possible to configure the iOS app to use such custom http headers?
Thanks in advance, Marcelo