golang-reverse-proxy-middleware
软件架构说明
-
cd static && pnpm install && pnpm run build && cd ..
-
cp -r -v static/dist/* public/
-
go build main.go
go run main.go
设置环境变量 token 访问秘钥token123456
设置环境变量 port 监听端口8080
访问地址:
http://localhost:8080/token/token123456/https/www.360.cn
http://localhost:8080/token/token123456/http/example.com
可以设定请求头中的字段"x-proxy-redirect"为"error" | "follow" | "manual"来设定代理行为的重定向方式.