package utils

import (
	"net/url"

	"github.com/gofiber/fiber/v3"
)

func FullURI(ctx fiber.Ctx) string {
	fullURL := string(ctx.Request().URI().FullURI())
	u, err := url.Parse(fullURL)
	if err != nil {
		return ""
	}
	u.Scheme = ctx.Scheme()
	u.Host = ctx.Host()

	return u.String()
}
