Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🚀 [Feature]: Support fiber v3 for websocket middleware #1369

@Cierra-Runis

Description

@Cierra-Runis

Feature Description

As titled.

Additional Context (optional)

cannot use c (variable of type *"github.com/gofiber/fiber/v3".Ctx) as *"github.com/gofiber/fiber/v2".Ctx value in argument to websocket.IsWebSocketUpgradecompiler[IncompatibleAssign](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#IncompatibleAssign)

Code Snippet (optional)

package middleware

import (
	"github.com/gofiber/contrib/websocket"
	"github.com/gofiber/fiber/v3"
)

func WebSocketMiddleware(c *fiber.Ctx) error {
	if websocket.IsWebSocketUpgrade(c) {
	}
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions