[bugfix] Set cache-control max-age dynamically for s3 (#1510)

* [bugfix] set cache-control max-age dynamically for s3

* woops

* double whoops

* time until, thank you linter, bless you, you're the best, no matter what kim says

* aa
This commit is contained in:
tobi
2023-02-16 14:18:53 +01:00
committed by GitHub
parent 40b584c219
commit 6ee0dc8c7d
4 changed files with 42 additions and 29 deletions

View File

@@ -20,8 +20,9 @@ package model
import (
"io"
"net/url"
"time"
"github.com/superseriousbusiness/gotosocial/internal/storage"
)
// Content wraps everything needed to serve a blob of content (some kind of media) through the API.
@@ -35,7 +36,7 @@ type Content struct {
// Actual content
Content io.ReadCloser
// Resource URL to forward to if the file can be fetched from the storage directly (e.g signed S3 URL)
URL *url.URL
URL *storage.PresignedURL
}
// GetContentRequestForm describes a piece of content desired by the caller of the fileserver API.