mirror of
https://github.com/eolinker/apinto
synced 2025-10-05 08:47:04 +08:00
新增格式转换插件,新增http日志变量,调整json输出请求日志格式
This commit is contained in:
@@ -3,11 +3,13 @@ package http_context
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
eoscContext "github.com/eolinker/eosc/eocontext"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
eoscContext "github.com/eolinker/eosc/eocontext"
|
||||
"github.com/valyala/fasthttp"
|
||||
|
||||
"github.com/eolinker/eosc/log"
|
||||
|
||||
"github.com/eolinker/eosc/utils/config"
|
||||
@@ -24,7 +26,9 @@ type WebsocketContext struct {
|
||||
upstreamConn net.Conn
|
||||
}
|
||||
|
||||
var upgrader = websocket.FastHTTPUpgrader{}
|
||||
var upgrader = websocket.FastHTTPUpgrader{
|
||||
CheckOrigin: func(ctx *fasthttp.RequestCtx) bool { return true },
|
||||
}
|
||||
|
||||
func (w *WebsocketContext) Upgrade() error {
|
||||
err := upgrader.Upgrade(w.fastHttpRequestCtx, func(conn *websocket.Conn) {
|
||||
|
Reference in New Issue
Block a user