mirror of https://github.com/JustKato/FreePad.git
* Debug on live
This commit is contained in:
parent
5518103575
commit
796a3b07c4
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue