improve logging and add disable form feature

This commit is contained in:
Gianni Carafa
2023-11-03 08:17:11 +01:00
parent 377a577c67
commit b786796595
4 changed files with 21 additions and 2 deletions

View File

@@ -2,6 +2,12 @@ package handlers
import "github.com/gofiber/fiber/v2"
func NoForm(c *fiber.Ctx) error {
c.Set("Content-Type", "text/html")
c.SendStatus(fiber.StatusNotFound)
return c.SendString("Form Disabled")
}
func Form(c *fiber.Ctx) error {
c.Set("Content-Type", "text/html")
return c.SendString(html)

View File

@@ -48,7 +48,7 @@ func fetchSite(urlpath string, queries map[string]string) (string, *http.Request
return "", nil, nil, err
}
if os.Getenv("LOG_URLS ") == "" || os.Getenv("NOLOGS") == "true" {
if os.Getenv("DEBUG ") == "true" {
log.Println(u.String() + urlQuery)
}