Skip to content

Apply widget gateway response headers and keep thumbnail errors local - #3219

Merged
shizn merged 2 commits into
mainfrom
fix/widget-gateway-response-policy-nov29
Nov 29, 2026
Merged

shizn merged 2 commits into
mainfrom
fix/widget-gateway-response-policy-nov29

Conversation

@shizn

@shizn shizn commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Apply a shared gateway response policy to public rewrites, thumbnails, account-removal responses, and errors. README embeds continue to use image and picture elements. The policy blocks framing of pages and provides MIME sniffing protection, HTTPS transport policy, and a referrer policy.

The thumbnail handler returns a locally composed PNG or a fixed plain-text error. When the renderer is unavailable or returns a different media type, it first tries the existing snapshot. Images are bounded before decoding. The standalone snapshot writer shares the same PNG validation and keeps its separate per-image and batch budgets. Public error and operational log messages omit upstream response bodies and query data.

TypeScript and all 17 gateway tests passed on Node 24. Local HTTP fixtures exercised a valid rendered image, a missing upstream image, an undecodable response, GET and HEAD, and reading a previously archived image without a write credential. The independent gateway requires a separate deployment.

@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ossinsight-docs Ready Ready Preview Nov 29, 2026 3:19pm UTC
ossinsight-web Ready Ready Preview Nov 29, 2026 3:19pm UTC

Request Review

@shizn
shizn merged commit fc09f4a into main Nov 29, 2026
4 checks passed
@shizn
shizn deleted the fix/widget-gateway-response-policy-nov29 branch November 29, 2026 15:23

This branch was successfully deployed

2 active deployments
Preview – ossinsight-web — 35a681b7 Deployed Nov 29, 2026 by vercel[bot]
Preview – ossinsight-docs — 35a681b7 Deployed Nov 29, 2026 by vercel[bot]
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.

1 participant