rimgo/pages/frontpage.go

17 lines
470 B
Go
Raw Normal View History

2022-01-18 00:07:07 +00:00
package pages
2022-01-28 01:41:10 +00:00
import (
"codeberg.org/video-prize-ranch/rimgo/utils"
"github.com/gofiber/fiber/v2"
)
2022-01-18 00:07:07 +00:00
func HandleFrontpage(c *fiber.Ctx) error {
2022-01-28 01:41:10 +00:00
utils.SetHeaders(c)
c.Set("Cache-Control", "public,max-age=31557600")
c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self'; img-src 'self'; font-src 'self'; manifest-src 'self'; block-all-mixed-content")
2022-01-18 00:07:07 +00:00
2022-02-02 15:53:33 +00:00
return c.Render("frontpage", fiber.Map{
2022-03-22 20:56:27 +00:00
"proto": c.Protocol(),
2022-02-02 15:53:33 +00:00
"domain": c.Hostname(),
})
2022-01-18 00:07:07 +00:00
}