mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-20 20:08:46 +00:00
fix: caching of assets (correct headers and versioned avatar and variables.css url) (#4118)
* fix: caching of assets (correct headers and versioned avatar url) * serve variables.css versioned and extend shared max age of assets * fix TestCommandSide_AddHumanAvatar * refactor: const types * refactor: return values Co-authored-by: Fabi <[email protected]> Co-authored-by: adlerhurst <[email protected]>
This commit is contained in:
co-authored by
Fabi
adlerhurst
parent
0c6b47a081
commit
dcac08b1d5
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/http/middleware"
|
||||
"github.com/zitadel/zitadel/internal/errors"
|
||||
"github.com/zitadel/zitadel/internal/static"
|
||||
"github.com/zitadel/zitadel/internal/static/database"
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
|
||||
type AssetStorageConfig struct {
|
||||
Type string
|
||||
Cache middleware.CacheConfig
|
||||
Config map[string]interface{} `mapstructure:",remain"`
|
||||
}
|
||||
|
||||
|
||||
@@ -35,3 +35,7 @@ type Asset struct {
|
||||
Location string
|
||||
ContentType string
|
||||
}
|
||||
|
||||
func (a *Asset) VersionedName() string {
|
||||
return a.Name + "?v=" + a.Hash
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user