Version: v0.180.0 Latest Latest

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 50 Imported by: 2




This section is empty.


This section is empty.


func Admin

func Admin(rateConverter *currency.RateConverter, rateConverterFetchingInterval time.Duration) *http.ServeMux

func NewJsonDirectoryServer

func NewJsonDirectoryServer(schemaDirectory string, validator openrtb_ext.BidderParamValidator, aliases map[string]string) httprouter.Handle

NewJsonDirectoryServer is used to serve .json files from a directory as a single blob. For example, given a directory containing the files "a.json" and "b.json", this returns a Handle which serves JSON like:


"a": { ... content from the file a.json ... },
"b": { ... content from the file b.json ... }


This function stores the file contents in memory, and should not be used on large directories. If the root directory, or any of the files in it, cannot be read, then the program will exit.

func SupportCORS

func SupportCORS(handler http.Handler) http.Handler

Fixes #648

These CORS options pose a security risk... but it's a calculated one. People _must_ call us with "withCredentials" set to "true" because that's how we use the cookie sync info. We also must allow all origins because every site on the internet _could_ call us.

This is an inherent security risk. However, PBS doesn't use cookies for authorization--just identification. We only store the User's ID for each Bidder, and each Bidder has already exposed a public cookie sync endpoint which returns that data anyway.

For more info, see:

- - -


type NoCache

type NoCache struct {
	Handler http.Handler

func (NoCache) ServeHTTP

func (m NoCache) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Router

type Router struct {
	MetricsEngine   *metricsConf.DetailedMetricsEngine
	ParamsValidator openrtb_ext.BidderParamValidator
	Shutdown        func()

func New

func New(cfg *config.Configuration, rateConvertor *currency.RateConverter) (r *Router, err error)

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

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