diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-10-13 11:51:43 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-10-13 11:52:05 -0400 |
| commit | 1c691a5e211105ace7cc3a2a8a6f68a05406271b (patch) | |
| tree | 10ab068bea3e86535fe98f52334a0de4830e1ae1 /cmd | |
| parent | 6e71913e16f168d5ff4db5b12dd02a595c41d521 (diff) | |
| download | x-1c691a5e211105ace7cc3a2a8a6f68a05406271b.tar.xz x-1c691a5e211105ace7cc3a2a8a6f68a05406271b.zip | |
cmd/xedn: serve right content-type for SVG files hackily
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/xedn/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/xedn/main.go b/cmd/xedn/main.go index 1e4104e..48da62f 100644 --- a/cmd/xedn/main.go +++ b/cmd/xedn/main.go @@ -201,6 +201,10 @@ func (dc *Cache) Load(dir string, w io.Writer) error { return err } + if h.Get("Content-Type") == "" && filepath.Ext(dir) == ".svg" { + h.Set("Content-Type", "image/svg+xml") + } + data = bkt.Get([]byte("body")) if data == nil { return ErrNotCached |
