mirror of https://github.com/JustKato/FreePad.git
This commit is contained in:
parent
becbf30752
commit
7982d564e8
|
@ -40,13 +40,6 @@ func BindSocket(router *gin.RouterGroup) {
|
||||||
|
|
||||||
func webSocketUpgrade(ctx *gin.Context, padName string) {
|
func webSocketUpgrade(ctx *gin.Context, padName string) {
|
||||||
|
|
||||||
for name, values := range ctx.Request.Header {
|
|
||||||
// Loop over all values for the name.
|
|
||||||
for _, value := range values {
|
|
||||||
fmt.Println(name, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conn, err := wsUpgrader.Upgrade(ctx.Writer, ctx.Request, ctx.Request.Header)
|
conn, err := wsUpgrader.Upgrade(ctx.Writer, ctx.Request, ctx.Request.Header)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed to set websocket upgrade: %v\n", err)
|
fmt.Printf("Failed to set websocket upgrade: %v\n", err)
|
||||||
|
|
Loading…
Reference in New Issue