mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-02-04 14:44:38 +08:00
Merge pull request #312 from linuxserver/universal-cloudflared-base64
disable base64 line wrapping to allow long password
This commit is contained in:
commit
62797fce98
@ -62,7 +62,7 @@ Container images/mods are configured using parameters passed at runtime (such as
|
||||
| `CF_ACCOUNT_ID` | Cloudflare account ID | |
|
||||
| `CF_API_TOKEN` | Cloudflare API token | Must have the `Account.Cloudflare Tunnel:Edit` and `Zone.DNS:Edit` permissions. |
|
||||
| `CF_TUNNEL_NAME` | Cloudflare tunnel name | |
|
||||
| `CF_TUNNEL_PASSWORD` | Cloudflare tunnel password | 32 char minimum, 64 char maximum |
|
||||
| `CF_TUNNEL_PASSWORD` | Cloudflare tunnel password | 32 char minimum |
|
||||
| `CF_TUNNEL_CONFIG` | Cloudflare tunnel config, please refer to Cloudflare's [official tunnel docs](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/configuration-file/ingress). | Do not add `tunnel`/`credentials-file` headers, these are handled automatically. |
|
||||
| `FILE__<VARIABLE_NAME>`| Sources content of the file as value in case of multiline content | `FILE__CF_TUNNEL_CONFIG=/config/tunnelconfig.yml` |
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ if [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUN
|
||||
echo "**** Cloudflare tunnel parameters found, starting cloudflare tunnel setup... ****"
|
||||
echo "**** Creating cloudflare tunnel (${CF_TUNNEL_NAME}) via API... ****"
|
||||
|
||||
CF_TUNNEL_SECRET="$(command echo ${CF_TUNNEL_PASSWORD} | base64)"
|
||||
CF_TUNNEL_SECRET="$(command echo ${CF_TUNNEL_PASSWORD} | base64 -w 0)"
|
||||
JSON_RESULT=$(curl -sX \
|
||||
POST "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/tunnels" \
|
||||
-H "Authorization: Bearer ${CF_API_TOKEN}" \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user