Skip to content

Use valid image proxy content type fallback#754

Open
ChristianPavilonis wants to merge 1 commit into
mainfrom
issue-429-image-content-type
Open

Use valid image proxy content type fallback#754
ChristianPavilonis wants to merge 1 commit into
mainfrom
issue-429-image-content-type

Conversation

@ChristianPavilonis

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the invalid image/* response Content-Type fallback with application/octet-stream.
  • Covers both proxy response finalization paths and updates the first-party proxy guide.

Changes

File Change
crates/trusted-server-core/src/proxy.rs Added a shared image fallback content-type constant, used it in normal and streaming finalization paths, and updated tests.
docs/guide/first-party-proxy.md Updated image handling docs to describe the valid fallback and trigger behavior.

Closes

Closes #429

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • JS tests: cd crates/js/lib && npx vitest run
  • JS format: cd crates/js/lib && npm run format
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve
  • Other: cargo test -p trusted-server-core proxy; cargo test -p trusted-server-core

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses tracing macros (not println!)
  • New code has tests
  • No secrets or credentials committed

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.

image/* is not a valid Content-Type for responses

1 participant