router

package
v1.50.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpHeaderKeyXFrameOptions = "X-Frame-Options"
)

Variables

This section is empty.

Functions

func HasFileExt

func HasFileExt(path string) bool

HasFileExt returns true if the given path has a file extension

func IsKnownBabbageEndpoint

func IsKnownBabbageEndpoint(path string) bool

IsKnownBabbageEndpoint returns true if the given path matches a known babbage endpoint

func New

func New(cfg Config) http.Handler

func SecurityHandler added in v1.43.0

func SecurityHandler(h http.Handler) http.Handler

SecurityHandler ...

Types

type Config

type Config struct {
	HealthCheckHandler           func(w http.ResponseWriter, req *http.Request)
	AnalyticsHandler             http.Handler
	AreaProfileEnabled           bool
	AreaProfileHandler           http.Handler
	DownloadHandler              http.Handler
	DatasetHandler               http.Handler
	DatasetClient                datasetType.DatasetClient
	NewDatasetRoutingEnabled     bool
	PrefixDatasetHandler         http.Handler
	CookieHandler                http.Handler
	FilterHandler                http.Handler
	FilterFlexHandler            http.Handler
	FilterFlexEnabled            bool
	FilterClient                 datasetType.FilterClient
	FeedbackHandler              http.Handler
	ContentTypeByteLimit         int
	ZebedeeClient                allRoutes.ZebedeeClient
	GeographyEnabled             bool
	GeographyHandler             http.Handler
	InteractivesEnabled          bool
	InteractivesHandler          http.Handler
	LegacySearchRedirectsEnabled bool
	SearchRoutesEnabled          bool
	EnableSearchABTest           bool
	SearchABTestPercentage       int
	SiteDomain                   string
	SearchHandler                http.Handler
	RelCalHandler                http.Handler
	RelCalEnabled                bool
	RelCalRoutePrefix            string
	HomepageHandler              http.Handler
	BabbageHandler               http.Handler
	CensusAtlasHandler           http.Handler
	CensusAtlasEnabled           bool
}

type Handler

type Handler http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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