secure

package
v0.0.0-...-598a1f7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: AGPL-3.0, MIT Imports: 1 Imported by: 0

Documentation

Overview

Package secure adds headers to protect against xss and reflection attacks and force use of https

Index

Constants

This section is empty.

Variables

View Source
var ContentSecurityPolicy = "" /* 221-byte string literal not displayed */

ContentSecurityPolicy defaults to a strict policy disallowing iframes and scripts from any other origin save self (and Google Analytics for scripts)

Functions

func HSTSMiddleware

func HSTSMiddleware(h http.HandlerFunc) http.HandlerFunc

HSTSMiddleware adds only the Strict-Transport-Security with a duration of 2 years

func Middleware

func Middleware(h http.HandlerFunc) http.HandlerFunc

Middleware adds some headers suitable for secure sites

Types

This section is empty.

Jump to

Keyboard shortcuts

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