rtr

package module
v0.0.0-...-89f4574 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DEVNULL = "devnull.invalid"

DEVNULL is a DNS name that is guarenteed to fail a DNS lookup due to using a reserved TLD https://tools.ietf.org/html/rfc2606

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(addr string, supervisorHost string, headersToRemove, queriesToRemove []string, hostCalculator HostCalculator, log *logrus.Logger) error

ListenAndServe listens on the provided address and Reverse-Proxies incoming requests to the endpoints as calculated by hostCalculator, while removing the headers and queries specified.

Types

type HostCalculator

type HostCalculator func(*http.Request) (string, error)

HostCalculator takes a given request and calculates the host to resolve to.

Jump to

Keyboard shortcuts

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