Documentation ¶
Index ¶
Constants ¶
View Source
const HeaderOnsPageType = "ONS-Page-Type" // NOTE: when using the http method Add and Get, this returns the canonical format: "Ons-Page-Type"
HeaderOnsPageType is the header name that defines the handler that will be used by the Middleware
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(routesHandler map[string]http.Handler, zebedeeClient ZebedeeClient, contentTypeByteLimit int) func(h http.Handler) http.Handler
Handler implements the middleware for dp-frontend-router. It sets the locale code, obtains the necessary cookies for the request path and access_token, authenticates with Zebedee if required, and obtains the "ONS-Page-Type" header to use the handler for the page type, if present.
Types ¶
Click to show internal directories.
Click to hide internal directories.