rimgo/pages/frontpage.go
video-prize-ranch 85035243e9 Search (#122)
#113

Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/122
Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
2023-08-10 15:02:51 +00:00

20 lines
562 B
Go

package pages
import (
"codeberg.org/rimgo/rimgo/utils"
"github.com/gofiber/fiber/v2"
)
var VersionInfo string
func HandleFrontpage(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 'self'; style-src 'self'; img-src 'self'; manifest-src 'self'; block-all-mixed-content")
return c.Render("frontpage", fiber.Map{
"config": utils.Config,
"version": VersionInfo,
})
}