mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-02-09 23:26:28 +00:00
port most routes
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/rimgo/rimgo/render"
|
||||
"codeberg.org/rimgo/rimgo/utils"
|
||||
)
|
||||
|
||||
func HandlePrivacy(c *fiber.Ctx) error {
|
||||
utils.SetHeaders(c)
|
||||
c.Set("X-Frame-Options", "DENY")
|
||||
c.Set("Content-Security-Policy", "default-src 'none'; form-action 'self'; style-src 'self'; img-src 'self'; manifest-src 'self'; block-all-mixed-content")
|
||||
func HandlePrivacy(w http.ResponseWriter, r *http.Request) error {
|
||||
utils.SetHeaders(w)
|
||||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
w.Header().Set("Content-Security-Policy", "default-src 'none'; form-action 'self'; style-src 'self'; img-src 'self'; manifest-src 'self'; block-all-mixed-content")
|
||||
|
||||
return c.Render("privacy", fiber.Map{
|
||||
return render.Render(w, "privacy", map[string]any{
|
||||
"config": utils.Config,
|
||||
"version": VersionInfo,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user