Commit Graph
971 Commits
Author SHA1 Message Date
MarSeventh 476827c009 fix: add getcontenttype to PROPFIND response for file preview in Alist
Read FileType from metadata to populate D:getcontenttype (e.g.
image/jpeg), enabling WebDAV clients like Alist to identify file
types and show image previews.
2026-05-01 20:41:19 +08:00
MarSeventh c2e4de5b8c fix: PROPFIND returns correct file size and href for WebDAV clients
- Read FileSizeBytes instead of non-existent File-Size metadata field,
  so getcontentlength reports actual bytes instead of always 0
- Add /dav prefix to file href so WebDAV clients can GET files at the
  correct path

Fixes files showing as 0B and being unopenable in RaiDrive, Cyberduck,
and Windows mapped drives.
2026-05-01 20:36:07 +08:00
MarSeventh 18b2db1224 fix: WebDAV internal calls use dedicated API Token for authentication
- Add 'internal' token type to API Token system, hidden from the
  security settings token list
- When WebDAV is enabled, auto-create an internal API Token with
  list/upload/delete permissions, stored in WebDAV config
- When WebDAV is disabled, auto-delete the internal token
- WebDAV handler reads the internal token from config and sends it
  as Bearer auth; if missing, creates one on-the-fly as fallback
- Works across both Docker and Cloudflare deployments since the
  token is persisted in KV/D1, not in process memory
2026-05-01 20:27:37 +08:00
MarSeventh bab238a6dc fix: catch-all [[path]].js route matching off-by-one for root paths
The loop in findFunctionFile started from parts.length - 1, which
skipped the directory-level [[path]].js match when the request path
had exactly one segment (e.g. /dav/, /file/). Changed to start from
parts.length so these root paths correctly resolve to their handlers.

Fixes /dav/ returning 404 and /file/ similarly affected.
2026-05-01 19:24:57 +08:00
MarSeventh 99a8f8d9c5 fix: reduce customer config list load
Return only customer summaries from the list endpoint and lazy-load per-IP files to avoid sending full upload records on every page load.
2026-04-29 16:53:58 +08:00
MarSeventh 7b1211d181 readme: uniform sponsor name 2026-04-29 16:16:23 +08:00
MarSeventh 7823315b44 fix: reduce manage mutation response payloads 2026-04-29 16:04:36 +08:00
MarSeventh 8a479f75ca fix: prevent cached manage API mutations 2026-04-29 15:59:03 +08:00
MarSeventh 6cec90176b fix: require admin auth for file preview
Treat from=admin as an admin preview marker that requires validated admin credentials, and keep admin preview responses privately cached.
2026-04-29 15:18:31 +08:00
MarSeventh 7d01d04547 fix: skip records without timestamps in batch list 2026-04-28 23:25:22 +08:00
MarSeventh 2dbc1ea232 refactor: simplify saving logic of upload config in sysCog API 2026-04-28 21:30:37 +08:00
MarSeventh 36f886b1d7 readme: add more support channels 2026-04-28 20:57:03 +08:00
MarSeventh 9004ed86cb readme: add more support channels 2026-04-28 20:47:38 +08:00
MarSeventh 30dad1f599 readme: add more support channels 2026-04-28 20:38:52 +08:00
MarSeventh 495a0d1b81 readme: add more support channels 2026-04-28 20:35:14 +08:00
MarSeventh c7a0370928 readme: add more support channels 2026-04-28 20:33:29 +08:00
MarSeventh ab3b55567c readme: add more support channels 2026-04-28 20:26:01 +08:00
MarSeventh e5a38f2b6d test: remove webdav test files 2026-04-28 17:56:53 +08:00
MarSeventh 392ef53409 refactor: move storage api utils into subdirectory 2026-04-28 17:54:43 +08:00
MarSeventh 8290321dd6 fix: disappeared custom header setting for webdav channel 2026-04-28 17:47:44 +08:00
MarSeventh ba4081b288 bump version to v2.7.2 2026-04-28 17:06:46 +08:00
MarSeventh 9d84a0b34a fix: migrate session storage to manage@ prefix and fix D1 adapter routing
- Change SESSION_PREFIX from 'session@' to 'manage@session@' to prevent
  sessions from appearing in file index and backups
- Add KV expirationTtl for automatic session cleanup on expiry
- Fix D1 adapter: route all manage@ keys to settings table instead of
  files table (fixes blockipList and session storage in wrong table)
- Fix D1 list({ prefix: 'manage@' }) not matching settings table
  (fixes backup not containing settings data)
- Exclude manage@session@ keys from settings backup export
2026-04-28 17:04:41 +08:00
MarSeventh 062a71213d feat: add webdav upload channel 2026-04-28 16:38:12 +08:00
叁月柒andGitHub 633dbe77e9 Merge pull request #536 from htazq/feature/webdav-storage-channel
Enable third-party WebDAV storage without new runtime dependencies
2026-04-28 16:31:37 +08:00
htazq f046b15e6a Keep WebDAV secrets out of file metadata
WebDAV upload records now store only the channel identity and object/public paths. Read, delete, move, and rename operations resolve credentials and headers from the current WebDAV channel config by ChannelName, with a legacy metadata fallback so already-created records remain usable.

Constraint: Preserve existing WebDAV object lifecycle behavior while reducing metadata exposure

Rejected: Keep credentials on every file record | expands exposure through metadata reads, backups, and logs

Confidence: high

Scope-risk: moderate

Directive: Keep WebDAV credentials in upload config/env; do not reintroduce per-file credential metadata

Tested: npm test; node deploy/worker/generate-routes.js; npx wrangler deploy --dry-run --config deploy/worker/wrangler.toml; git diff --check

Not-tested: Live WebDAV provider move/delete/read workflow
2026-04-28 09:42:03 +08:00
htazq 9c7a2b4336 Enable third-party WebDAV storage without new runtime dependencies
Cloudflare Workers and Pages already provide the Fetch/Web APIs needed for WebDAV verbs, so the storage integration uses a small local helper instead of adding a Node-oriented WebDAV client. The channel now participates in upload, read, delete, move, rename, channel listing, and runtime config, with chunked uploads explicitly guarded because WebDAV has no portable server-side compose primitive.

Constraint: Preserve Pages Functions and generated Worker deployment paths
Constraint: No new npm dependency for WebDAV client behavior
Rejected: Add a WebDAV npm client | likely Node API/compatibility and package-lock churn
Rejected: Treat WebDAV as External URL only | not a complete storage channel lifecycle
Confidence: high
Scope-risk: moderate
Directive: WebDAV here is third-party storage; keep it distinct from the built-in /dav server settings
Tested: npm test; node worker/generate-routes.js; npx wrangler deploy --dry-run --config worker/wrangler.toml; git diff --cached --check
Not-tested: Live third-party WebDAV provider credentials; Digest-only WebDAV authentication
2026-04-28 00:05:12 +08:00
MarSeventh 322cf49532 build: update frontend dist (login keyboard avoidance rework + mobile spacing optimization) 2026-04-27 15:40:55 +08:00
MarSeventh e50ff0e16f chore: update static media asset paths 2026-04-26 19:34:03 +08:00
MarSeventh 28d0827f19 Merge branch 'dev' 2026-04-26 18:17:11 +08:00
MarSeventh 59790e3422 chore: update github actions runtime versions 2026-04-26 18:14:32 +08:00
MarSeventh 3d23462dfc chore: update github actions runtime versions 2026-04-26 18:09:42 +08:00
MarSeventh ab23ee76ae Move deployment adapters under deploy 2026-04-26 17:46:38 +08:00
MarSeventh 3a15fc0792 fix: add Pages context compatibility for worker routes 2026-04-26 16:51:56 +08:00
MarSeventh 92f60ecdd8 refactor: move wrangler.worker.toml into worker/ directory
- Rename to worker/wrangler.toml
- Update all paths (main, assets directory) to be relative to worker/
- Update package.json, workflow, generate-toml.js, .dockerignore
- Fix .gitignore to only ignore root wrangler.toml
2026-04-25 20:31:41 +08:00
MarSeventh b70d0a6f89 fix: remove redundant checkDatabaseConfig from manage middleware
Already executed by parent api/_middleware.js in the chain.
2026-04-25 19:09:58 +08:00
MarSeventh 842d4cea9d chore: remove outdated .worker-assets comment from wrangler.worker.toml 2026-04-25 18:08:25 +08:00
MarSeventh 8a334a850e refactor: move static/readme to root level, remove empty static/ 2026-04-25 18:02:34 +08:00
MarSeventh e5a4d3f6c2 chore: exclude unnecessary files from Docker image 2026-04-25 17:59:55 +08:00
MarSeventh 83300a9b7b chore: remove duplicate static assets from outer static/ 2026-04-25 17:58:25 +08:00
MarSeventh a48c4499b8 fix: add static assets (404/block/whitelist images) to frontend-dist 2026-04-25 17:55:51 +08:00
MarSeventh e37125c71c feat: skip Worker deployment when CLOUDFLARE_API_TOKEN not configured 2026-04-24 23:53:47 +08:00
MarSeventh 7c22e0ccdb fix: remove secrets check from job-level if (not allowed by GitHub Actions) 2026-04-24 20:22:41 +08:00
MarSeventh 41e8bdd3f1 refactor: use github.event.repository.fork instead of hardcoded repo name 2026-04-24 20:17:58 +08:00
MarSeventh c56a0e0ec3 feat: support WORKER_NAME from secrets for push-triggered deploys 2026-04-24 20:12:57 +08:00
MarSeventh a03d2f3135 feat: support WORKER_NAME from secrets for push-triggered deploys 2026-04-24 20:10:44 +08:00
MarSeventh 35125655ca feat: auto-deploy Workers on main branch push
- Add push trigger on main branch (works with sync.yml)
- Skip deployment on original repo and forks without secrets
2026-04-24 20:09:18 +08:00
MarSeventh 336963b7f2 fix: update generate-toml.js assets directory to frontend-dist 2026-04-24 19:22:46 +08:00
MarSeventh 4f629eab7e docs: add v2.7.1 build output directory change notice to README 2026-04-24 19:11:58 +08:00
MarSeventh 106a5c9ecf chore: remove worker-assets from .gitignore 2026-04-24 19:04:37 +08:00
MarSeventh ba81e1b814 refactor: remove prepare-assets, point wrangler directly to frontend-dist
- Delete worker/prepare-assets.js
- wrangler.worker.toml assets directory → frontend-dist
- Remove prepare-assets step from workflow and deploy script
- Remove .worker-assets from .gitignore
2026-04-24 19:01:42 +08:00