reqorigin

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package reqorigin provides functions for extracting 'X-Origin' header from http request.

Index

Constants

View Source
const OriginKey = "X-Origin"

Variables

This section is empty.

Functions

func FromRequest

func FromRequest(req *http.Request) string

FromRequest extracts the value of the 'X-Origin' header.

func SetHeader

func SetHeader(req *http.Request, origin string)

SetHeader sets X-Origin: origin to the request headers.

If origin is empty string, it does nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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