mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 16:21:11 +08:00
25w04a
This commit is contained in:
parent
5258046faa
commit
c2047c49e5
16 changed files with 555 additions and 391 deletions
16
proxy/reqheader.go
Normal file
16
proxy/reqheader.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package proxy
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// 设置请求头
|
||||
func setRequestHeaders(c *gin.Context, req *http.Request) {
|
||||
for key, values := range c.Request.Header {
|
||||
for _, value := range values {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue