INNER CODE UNIT · Go

func

zalando/skipper · doc.go:311

	func (f *helloFilter) Request(ctx filters.FilterContext) {}

	func (f *helloFilter) Response(ctx filters.FilterContext) {
	    ctx.Response().Header.Set("X-Hello", fmt.Sprintf("Hello, %s!", f.who))
	}

The above example creates a filter specification, and in the routes where
they are included, the filter instances will set the 'X-Hello' header
for each and every response. The name of the filter is 'hello', and in a
route definition it is referenced as:

	r: * -> hello("world") -> "https://www.example.org";

# Custom Build

The easiest way to create a custom Skipper variant is to implement the
required filters (as in the example above) by importing the Skipper
package, and starting it with the 'Run' command.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…