preflight

package
v0.0.0-...-94574dc Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreFlight

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

func NewPreFlight

func NewPreFlight(target string, origin string, method string, header []string) (*PreFlight, error)

NewPreFlight initializes a new CORS pre-flight scenario.

func (*PreFlight) PreFly

func (preFlight *PreFlight) PreFly() bool

PreFly will do the actual CORS pre-flight.

An options-request will be send to the target having origin as requester. The resolving response will be evaluated an results in the returned success state which will either be true (stating a successful pre-flight) or false stating an unsuccessful pre-flight.

Jump to

Keyboard shortcuts

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