This commit is contained in:
wjqserver 2025-04-15 10:23:29 +08:00
parent ab77c5c7da
commit bed6c486dc
6 changed files with 16 additions and 3 deletions

View file

@ -13,6 +13,9 @@ func setRequestHeaders(c *app.RequestContext, req *http.Request) {
})
}
// removeWSHeader removes the "Upgrade" and "Connection" headers from the given
// Request, which are added by the client when it wants to upgrade the
// connection to a WebSocket connection.
func removeWSHeader(req *http.Request) {
req.Header.Del("Upgrade")
req.Header.Del("Connection")