Minify html on-the-fly before sending it to users

This commit is contained in:
Tom Wiesing 2023-01-04 12:45:33 +01:00
parent b3039768af
commit 785130dc36
No known key found for this signature in database
7 changed files with 66 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import (
"context"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
"github.com/FAU-CDI/wisski-distillery/pkg/httpx"
)
type UpdateInstanceList struct {
@ -77,6 +78,6 @@ func (ur *UpdateHome) Cron(ctx context.Context) error {
return err
}
ur.Dependencies.Home.homeBytes.Set(bytes)
ur.Dependencies.Home.homeBytes.Set(httpx.MinifyHTML(bytes))
return nil
}