As it says in the title, im proxying a request to a target however it just renders the plain code in the browser instead of properly rendering the webiste.
if proxyPassCookie != hex.EncodeToString(cval) {
return c.Status(fiber.StatusBadRequest).SendString("ERROR ID: 0001")
}
// Cookie exists, act as a reverse proxy
prequestCounter.Inc()
return func(ctx *fiber.Ctx) error {
c.Set(fiber.HeaderContentType, fiber.MIMETextHTML)
return proxy.Forward(proxyTargetURL)(ctx)
}(c)
Ive tryed some variations but they either didnt proxy at all or errored straight away cause they are deprecated. Im using go version 1.21.1