Ultraviolet icon indicating copy to clipboard operation
Ultraviolet copied to clipboard

Cloudflare Access breaks UV and/or bare server

Open r58Playz opened this issue 1 year ago • 9 comments

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our Discord server.

Expected Behavior

UV works

Current Behavior

V3.ts fails to fetch the bare response.

Access to fetch at 'https://r58playz.cloudflareaccess.com/cdn-cgi/access/login/...' (redirected from 'https://.../bare/v3/?cache=008ec4453ff31513f43893cba7aa31c8') from origin '...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Possible Solution

Maybe pass cookies to the fetch request?

Steps to Reproduce

  1. Host something that uses UV behind cloudflare access
  2. Load a page

Context (Environment)

I am trying to accomplish making a private aboutproxy instance

Detailed Description

Possible Implementation

r58Playz avatar Sep 26 '23 05:09 r58Playz

Velocity isn’t working just cus the bare is down or if you don’t understand that the server it sends the proxies network traffic through is down

Notplayingallday383 avatar Sep 26 '23 16:09 Notplayingallday383

when i upload the code to replit, it wont work, it says network error, even tho there isnt an error

44011406 avatar Sep 28 '23 13:09 44011406

Don't run on replit

rifting avatar Sep 29 '23 02:09 rifting

Also stop commenting on unrelated issues

r58Playz avatar Sep 29 '23 02:09 r58Playz

misclick

e9x avatar Nov 22 '23 23:11 e9x

Hey, news about it?

pipoblak avatar Jan 12 '24 19:01 pipoblak

First, make a new group that includes everyone. make another application (self-hosted), and in this case, add the same domain, and then the /bare/ path. Click next, and make a policy. Change the include dropdown to bypass, and set the everyone group in the bottom.

IncognitoTGT avatar Jan 12 '24 21:01 IncognitoTGT

I do not want to expose my bare server. That is the main reason I am using Cloudflare Access in the first place. Only authenticated users should have access to the proxy.

r58Playz avatar Jan 12 '24 21:01 r58Playz

I do not want to expose my bare server. That is the main reason I am using Cloudflare Access in the first place. Only authenticated users should have access to the proxy.

Then you'll need to change how bare requests are sent, so they include that authentication cookie

itschasa avatar Apr 03 '24 18:04 itschasa