Skip to content

Add wrangler.toml for Cloudflare Worker - #16

Open
hamsandvich wants to merge 5 commits into
twilligon:masterfrom
hamsandvich:master
Open

Add wrangler.toml for Cloudflare Worker#16
hamsandvich wants to merge 5 commits into
twilligon:masterfrom
hamsandvich:master

Conversation

@hamsandvich

Copy link
Copy Markdown

Add a new wrangler.toml to configure the Cloudflare Worker for the git-lfs-s3-proxy project. Defines the worker name, main entry (_worker.js), and the compatibility_date (2026-03-02).

Add a new wrangler.toml to configure the Cloudflare Worker for the git-lfs-s3-proxy project. Defines the worker name, main entry (_worker.js), and the compatibility_date (2026-03-02).
@Freddiechang

Copy link
Copy Markdown

This helped me solve the cloudflare build issue. Thanks!

Add a [limits] section to wrangler.toml with cpu_ms = 300_000 to raise the Cloudflare Worker CPU allowance (300s). This accommodates longer-running operations for the git-lfs-s3-proxy worker.
Remove the [limits] cpu_ms setting from wrangler.toml to avoid deployment failures for Cloudflare Pages Free accounts. Add a README note explaining that the checked-in wrangler.toml intentionally omits limits.cpu_ms because custom CPU limits are only supported on paid Workers plans, and that adding such a limit will break deployments from Free plan accounts.
Allow configuring S3 presigned URL lifetime via an EXPIRY Worker env var and clamp it to R2's 7-day max. _worker.js: add parseExpiry to validate and cap expiry, pass expiry into sign(), and use the parsed env.EXPIRY for generated actions so large/slow LFS pushes can increase the URL lifetime. README.md: document the EXPIRY environment variable and give a 24-hour example. wrangler.toml: add observability/logs/traces configuration entries (sampling, persistence, invocation logs) to enable platform telemetry.
@twilligon

twilligon commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Right, I think this is an issue of Workers vs. (now "legacy") Pages, git-lfs-s3-proxy having originally been built for the latter. Given Cloudflare seems to really push people towards Workers these days (well, Pages also uses Workers, technically, but differently, hence this issue) it probably makes sense to demote the Pages middleware to its own non-default branch and have master be for Workers. Will take a look at your changes shortly and apply relevant ones to this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants