No command to enable/disable workers.dev and Preview URLs on an existing Worker

Đang mở
#196 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api, cli, cloud

Hướng nghiên cứu

Start with the existing cf workers list and cf workers triggers deploy command entry points, then compare their API handling with POST /accounts/{account_id}/workers/scripts/{script_name}/subdomain. Done means an existing Worker can enable or disable workers.dev and Preview URLs without a local project, using the requested settings.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

upstream

cf version: 1.0.0-beta.12 (macOS)

What I'm trying to do
Turn off the workers.dev route and Preview URLs for an existing Worker that is deployed by Workers Builds from a Git repo. There's no local cf project for it, so editing config and running cf deploy isn't an option.

What I found

  • cf workers list shows subdomain.enabled and subdomain.previews_enabled, but no command changes them.
  • cf cli search for "disable workers.dev subdomain for a worker", "workers.dev", "worker subdomain" and "update Worker settings" returns nothing relevant.
  • cf workers triggers deploy works from a local project only.
  • The API supports it: POST /accounts/{account_id}/workers/scripts/{script_name}/subdomain with {"enabled": false, "previews_enabled": false}.

Why it matters
Turning off workers.dev is the quickest way to take a Worker off the public internet, for example one that should only be reachable behind Access. Right now the only options in cf are deleting the Worker or going to the dashboard.

Suggestion
Something like cf workers subdomain update <worker> --enabled false --previews-enabled false, or an update command on cf workers that covers subdomain. Related: cloudflare/workers-sdk#16125.

Ngôn ngữ chính
TypeScript
Star
993
Fork
65
Merge trung bình
21 giờ 47 phút
Pull request đã merge (30 ngày)
209

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/cf

Tất cả issue của cloudflare/cf

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.