JGeek00 / droid-hole

Pi-hole® client made with Flutter
Apache License 2.0
135 stars 11 forks source link

Add Cloudflare Tunnel or Custom Header option #43

Open 3DJupp opened 7 months ago

3DJupp commented 7 months ago

Hey, as I am using Cloudflare Tunnel to secure my stuff it would be great to add another layer of security, instead of basic auth and path.

I would love to see some implementation Like a JWT or Header:

https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/ https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/application-token/

Example for the Headers:

CF-Access-Client-Id: <Client ID>
CF-Access-Client-Secret: <Client Secret>

Thank you! Kind regards Dominic/3DJupp

3DJupp commented 7 months ago

example from another implementation, openhab / http addon in that case.:

baseURL = "https://pihole.domain.tld/admin/api.php",
headers="CF-Access-Client-Id=12345678901234567890123456789012.access", "CF-Access-Client-Secret=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

(dummy data)