check_referer

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

README

check_referer

This code looks the upload path and checks that the referer for all uploaded files is the same as the page being served. This is to prevent hot-linking of images and other files that are uploaded.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbOn map[string]bool

Functions

func NewCheckReferer

func NewCheckReferer(handler http.Handler, cfg *UploadFile.UploadFileCfg, xcfg *ymux.BaseConfigType, dbF map[string]bool, f *os.File) http.Handler

Types

type CheckRefererHandler

type CheckRefererHandler struct {
	// contains filtered or unexported fields
}

func (*CheckRefererHandler) ServeHTTP

func (h *CheckRefererHandler) ServeHTTP(www http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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