* Debug on live

This commit is contained in:
Daniel Legt 2022-06-07 01:53:47 +03:00
parent 5518103575
commit 796a3b07c4
1 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,13 @@ 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)