mirror of
https://github.com/Harry-zklcdc/go-proxy-bingai.git
synced 2024-05-03 14:25:13 +08:00
15 lines
296 B
Go
15 lines
296 B
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"adams549659584/go-proxy-bingai/common"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func Index(w http.ResponseWriter, r *http.Request) {
|
||
|
if r.URL.Path == "/" {
|
||
|
http.Redirect(w, r, "/web/chat.html", http.StatusFound)
|
||
|
} else {
|
||
|
common.NewSingleHostReverseProxy(common.BING_URL).ServeHTTP(w, r)
|
||
|
}
|
||
|
}
|