wrangler-legacy
wrangler-legacy copied to clipboard
Support Cloudflare Access with `wrangler dev`
💡 Feature request
Describe the feature
I'm using wrangler dev
for development, but all URLs protected by Cloudflare Access get redirected to the login page and after a successful login I'm redirected from http://127.0.0.1:8787
to my production domain.
Describe the alternatives
I'm not aware of any alternatives or ways to bypass the login screen and redirect.
Hey @tillkruss, mind providing some more context here about your setup? If I understand correctly: you have a domain that is using Cloudflare Access, you also have a Worker that has a route on that domain, you attempt to run wrangler dev
on that Worker, and it takes you to the Access login screen? Is that correct?
Correct the Worker is attached to the domain root and handle website, admin and API requests.
The /admin
route is protected with Access and when I request http://127.0.0.1:8787/admin
I get redirected to the CF Access login page, which I'd like to bypass or get working when using wrangler dev
.
@tillkruss - would you mind sharing the full wrangler dev
command you're using, including all the args/params (ensuring nothing private/secret is exposed)
Thanks!
I just run the plain wrangler dev
. Should I be adding anything?
This is my toml file:
name = "..."
type = "webpack"
route = "...com/*"
zone_id = ""
account_id = ""
usage_model = "unbound"
kv-namespaces = [
{ binding = "app", id = "", preview_id = "" },
{ binding = "metrics", id = "", preview_id = "" },
{ binding = "leads", id = "", preview_id = "" },
]
[site]
bucket = "./public"
[triggers]
crons = ["*/3 * * * *", "*/10 * * * *"]
[vars]
ENVIRONMENT = "production"
SENTRY_DSN = ""
SENTRY_CLIENT_ID = ""
SENTRY_CLIENT_SECRET = ""
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.
Same issue here
Thanks for reporting this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this issue.
New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.