Skip to content

Cleanup / fix delegated routing response headers#241

Open
byo wants to merge 2 commits intomainfrom
cleanup-delegated-routing-response-headers
Open

Cleanup / fix delegated routing response headers#241
byo wants to merge 2 commits intomainfrom
cleanup-delegated-routing-response-headers

Conversation

@byo
Copy link
Copy Markdown
Contributor

@byo byo commented May 7, 2026

  • Always send X-Content-Type-Options: nosniff to prevent detection of content type
  • Add Vary: Accept to inform clients that the response depends on the Accept header
  • Fix Allow header when invalid method was used
  • Always send 404 Not found with text/plain content type
  • Always send the Cache-control: public header

@byo byo requested review from gammazero and willscott May 7, 2026 16:08
byo added 2 commits May 7, 2026 18:12
* Always send `X-Content-Type-Options: nosniff`
  to prevent detection of content type
* Add `Vary: Accept` to inform clients that the response
  depends on the Accept header
* Fix `Allow` header when invalid method was used
* Always send 404 Not found with `text/plain` content type
* Always send the `Cache-control: public` header
@byo byo force-pushed the cleanup-delegated-routing-response-headers branch from 37b7302 to 12a1396 Compare May 7, 2026 16:13
Copy link
Copy Markdown

@nymd nymd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth addressing? but not a blocker

Comment thread delegated_translator.go
h.Add("X-Content-Type-Options", "nosniff")
h.Add("Vary", "Accept")
h.Add("Cache-Control", "public")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe max-age is a good addition as well so we are specific about acceptable staleness.

@nymd nymd assigned byo May 7, 2026
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.

3 participants