proxy

package
v0.0.0-...-84bb0b5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package proxy provides a more featureful abstraction on top of httputil.ReverseProxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReverseProxy

type ReverseProxy struct {
	*httputil.ReverseProxy
	// contains filtered or unexported fields
}

func NewReverseProxy

func NewReverseProxy(target url.URL, htmlMutator htmlmut.MutateFunc) *ReverseProxy

func (*ReverseProxy) ServeHTTP

func (rp *ReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves the reverse proxy. If the request has a path that starts with the previously given targetURL, the server will 301 redirect that to a request with the path trimmed.

Jump to

Keyboard shortcuts

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