fastify / fastify/fastify-etag

Option for trailer etag

Open
#97 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
85
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested

### 🚀 Feature Proposal

Add an option to set the etag header as trailer header instead of normal header.

### Motivation

The fastify docs mention the etag header as an example for trailer headers: https://www.fastify.io/docs/latest/Reference/Reply/#trailerkey-function. So adding an option to making the etag header a trailer header inside of this fastify plugin might make sense.

**However**, I'm a little bit confused how a trailer etag is used by browsers. If the etag header is only sent after the body has been sent, what is the purpose of it? (e.g. status code can't change anymore, body transfer can't be skipped, ...). Maybe we should answer this first.

### Example

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.