go 语言 请求转发 本地转发到域名
go语言http本身的反向代理不支持一个ip多域名的情况,所以用下面这个
// proxyServer.go
package main
import (
fmt
log
net/http
io/ioutil
strings
)
//将request转发给 http://127.0.0.1:2003
func helloHandler(w http.ResponseWriter, r *http.Request) {
log.Println(r.RequestURI)
resp, err := http.Get(http://ylbzj