2023-06-10 16:04:29 +00:00
|
|
|
package pages
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2023-06-10 16:27:20 +00:00
|
|
|
"codeberg.org/rimgo/rimgo/utils"
|
2023-06-10 16:04:29 +00:00
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func HandleAbout(c *fiber.Ctx) error {
|
|
|
|
utils.SetHeaders(c)
|
|
|
|
c.Set("X-Frame-Options", "DENY")
|
|
|
|
c.Set("Cache-Control", "public,max-age=31557600")
|
|
|
|
c.Set("Content-Security-Policy", "default-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'; style-src 'self'; img-src 'self'; manifest-src 'self'; block-all-mixed-content")
|
|
|
|
|
|
|
|
return c.Render("about", fiber.Map{
|
|
|
|
"proto": c.Protocol(),
|
|
|
|
"domain": c.Hostname(),
|
|
|
|
"force_webp": os.Getenv("FORCE_WEBP"),
|
|
|
|
})
|
|
|
|
}
|