vary

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package vary provides express middleware that appends fields to the response Vary header, signalling which request headers a cached response depends on.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Options) express.Handler

New returns middleware that appends each configured field to the response's Vary header. Duplicate entries already present on the header are skipped so the header stays tidy.

Types

type Options

type Options struct {
	// Fields is the list of header names to append to the Vary header.
	Fields []string
}

Options configures the vary middleware.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL