Registry / networking / aaronland-go-http-rewrite

aaronland-go-http-rewrite

JSON →
library1.1.2gogounverified

An HTTP middleware for rewriting request URLs in Go.

go get github.com/aaronland/go-http-rewrite
INSTALL
IMPORT
SIG · AARONLAND-GO-HTTP-
A
aaronland-go-http-rewrite
networkinggov1.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rewrite
github.com/aaronland/go-http-rewrite

Creates a rewrite handler that redirects /old to /new.

package main import ( "net/http" "github.com/aaronland/go-http-rewrite" ) func main() { mux := http.NewServeMux() rewriteHandler := rewrite.NewRewriteHandler(mux, "/old", "/new") http.ListenAndServe(":8080", rewriteHandler) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
61 hits · last 30 days
node
50
OpenAI (training)
2
Resources
aaronland-go-http-rewrite — go get aaronland-go-http-rewrite · libregistry