secureheaders

package
v0.85.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

README

kit/middleware/secureheaders

github.com/vormadev/vorma/kit/middleware/secureheaders

Drop-in middleware that sets a strict baseline of security headers on every response.

Import

import "github.com/vormadev/vorma/kit/middleware/secureheaders"

Quick Start

wrapped := secureheaders.Middleware(appHandler)

What It Does

  • sets common hardening headers (COEP, COOP, CORP, HSTS, Referrer-Policy, X-Frame-Options, etc.)
  • sets a restrictive Permissions-Policy
  • removes identifying headers:
  • Server
  • X-Powered-By

The middleware writes headers before calling next, so downstream handlers can still override values if needed.

API Coverage

Functions
  • func Middleware(next http.Handler) http.Handler

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(next http.Handler) http.Handler

Sets various security-related headers to responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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