csrf protection

This commit is contained in:
Ruidy 2024-05-19 08:24:31 +02:00
parent e673acb5c2
commit c3b7f183ae
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
2 changed files with 2 additions and 1 deletions

View file

@ -77,7 +77,7 @@ func (ps PdfService) BuildInvoice(b *booking.Booking, hc *config.Host) error {
payload, err := json.Marshal(data)
if err != nil {
log.Warnf("Error marshalling JSON:", err)
log.Warnf("Error marshalling JSON: %s", err)
return err
}

View file

@ -150,6 +150,7 @@ func NewRouter(fs embed.FS, debug bool) *echo.Echo {
e.Use(middleware.Recover())
e.Use(middleware.Secure())
e.Use(middleware.Gzip())
e.Use(middleware.CSRF())
e.Use(sentryecho.New(sentryecho.Options{}))
e.Use(SentryTracingMiddleware)
// static assets