proxy

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const HotReloadScript = `` /* 1029-byte string literal not displayed */

Variables

This section is empty.

Functions

func InjectScript

func InjectScript(content []byte) []byte

func IsHTMLResponse

func IsHTMLResponse(contentType string) bool

func RewriteStylesheetHrefs added in v0.1.3

func RewriteStylesheetHrefs(content []byte) []byte

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a reverse proxy that injects the hot reload script into HTML responses.

func NewServer

func NewServer(targetURL string, wsPath string, isRebuilding func() bool) (*Server, error)

func (*Server) Handler

func (ps *Server) Handler(wsHandler http.Handler) http.Handler

func (*Server) ServeHTTP

func (ps *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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