#Cloudflare token headers

1 messages · Page 1 of 1 (latest)

hallow axle
#

Im trying to add these 2 headers to a Swarm URL backend.

CF-Access-Client-Secret: <Your-Client-Secret>```

What is the correct format? I have tried with and without the `:` I can access it in my browser by adding these headers so I know it should work.

If I add the `:` I get ```2024-08-22 12:17:31.692 [Debug] Backend 4 idling because: AggregateException: One or more errors occurred. (The format of value 'CF-Access-Client-Id: <redacted>  CF-Access-Client-Secret: <redacted>' is invalid.)``` 

If I do it without the `:` I get my logs flooded. I cannot upload those because it contains my tokens in plain text and I don't trust myself to remove them all. This HTML is the Access Denied page you would see if you entered the url into a browser.
```11:37:27.325 [Init] Initializing backend #1 - Swarm-API-Backend...
11:37:28.790 [Error] Final error (12) while initializing backend #1 - Swarm-API-Backend, giving up: Newtonsoft.Json.JsonReaderException: Failed to parse JSON `<!DOCTYPE html>  <html>    <head>    <title>Error · Cloudflare Access</title>    <meta charset="utf-8" />    <meta name="robots" content="noindex" />    <meta name="viewport" content="initial-scale=1, ```
hallow axle
#

se,&quot;mtls_status&quot;:&quot;NONE&quot;}"></input> </body>`: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at SwarmUI.Utils.Utilities.ParseToJson(String input) in C:\Users\Joe\source\repos\SwarmUI\src\Utils\Utilities.cs:line 435 at SwarmUI.Utils.Utilities.PostJson(HttpClient client, String url, JObject data, Action`1 adaptFunc) in C:\Users\Joe\source\repos\SwarmUI\src\Utils\Utilities.cs:line 263 at SwarmUI.Backends.SwarmSwarmBackend.ValidateAndBuild() in C:\Users\Joe\source\repos\SwarmUI\src\Backends\SwarmSwarmBackend.cs:line 92 at SwarmUI.Backends.SwarmSwarmBackend.Init() in C:\Users\Joe\source\repos\SwarmUI\src\Backends\SwarmSwarmBackend.cs:line 337 at SwarmUI.Backends.SwarmSwarmBackend.Init() in C:\Users\Joe\source\repos\SwarmUI\src\Backends\SwarmSwarmBackend.cs:line 371 at SwarmUI.Backends.BackendHandler.LoadBackendDirect(T2IBackendData data) in C:\Users\Joe\source\repos\SwarmUI\src\Backends\BackendHandler.cs:line 496

drifting sorrel
hallow axle
drifting sorrel
#

which is awful and cloudflare is smelly

#

but that'll cover that

hallow axle
#

but free SSL makes them less smelly.

hallow axle
#

To get around this I just whitelisted the IP. for anyone who finds this later I also had to set an auth rule in cloudflare access to allow this and stop redirecting to a login page.

I could not figure out how to bypass the login page using only service token like I originally wanted. If anyone figures that out I would love to learn.

drifting sorrel
#

use #announcements message

floral coral
#

@hallow axle We like free and easy SSLs. What are you trying to set up with CloudFlare or CloudFlared?

hallow axle
#

Using cloudflared.

#

Run your home lab like an enterprise company!! Use Red Hat Enterprise Linux for FREE: https://ntck.co/redhat

In this video, NetworkChuck will show you how to install and use Cloudflare Tunnel, the best way to expose and access your home lab resources from the internet. Traditionally, you would use a reverse proxy like Nginx Proxy Manager or Tr...

▶ Play video
floral coral
onyx jewel
#

Bad thing about cloudflared is that if you don't register a connection in the dashboard it disconnects randomly if you need to keep it alive

hallow axle
onyx jewel
hallow axle
onyx jewel