Skip to content

improve file serving: security headers, config usage, caching, and filename sanitization#60

Closed
MarcosBrendonDePaula wants to merge 1 commit intomainfrom
claude/review-fluxstack-file-serving-St6Z0
Closed

improve file serving: security headers, config usage, caching, and filename sanitization#60
MarcosBrendonDePaula wants to merge 1 commit intomainfrom
claude/review-fluxstack-file-serving-St6Z0

Conversation

@MarcosBrendonDePaula
Copy link
Copy Markdown
Collaborator

  • static-files-plugin: use pluginsConfig values instead of hardcoded paths,
    add ETag headers, X-Content-Type-Options: nosniff, differentiate cache
    strategy for hashed assets vs uploads, force download for dangerous MIME
    types, respect enablePublic/enableUploads config flags

  • vite plugin: serve pre-compressed .gz files when Accept-Encoding allows,
    fix SPA fallback to use no-cache (ensures new deploys are picked up),
    stream proxy responses instead of buffering in memory, fix collectFiles
    to fail explicitly when directory is missing instead of swallowing errors

  • FileUploadManager: add filename sanitization (strips control chars, path
    separators, shell-unsafe chars), validate fileSize > 0, make cleanup
    interval stoppable via dispose() and unref() to avoid leaking in tests

https://claude.ai/code/session_014rUaD4y9i3bB7RxYpK9S1U

…lename sanitization

- static-files-plugin: use pluginsConfig values instead of hardcoded paths,
  add ETag headers, X-Content-Type-Options: nosniff, differentiate cache
  strategy for hashed assets vs uploads, force download for dangerous MIME
  types, respect enablePublic/enableUploads config flags

- vite plugin: serve pre-compressed .gz files when Accept-Encoding allows,
  fix SPA fallback to use no-cache (ensures new deploys are picked up),
  stream proxy responses instead of buffering in memory, fix collectFiles
  to fail explicitly when directory is missing instead of swallowing errors

- FileUploadManager: add filename sanitization (strips control chars, path
  separators, shell-unsafe chars), validate fileSize > 0, make cleanup
  interval stoppable via dispose() and unref() to avoid leaking in tests

https://claude.ai/code/session_014rUaD4y9i3bB7RxYpK9S1U
@MarcosBrendonDePaula MarcosBrendonDePaula deleted the claude/review-fluxstack-file-serving-St6Z0 branch February 21, 2026 19:32
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.

2 participants