summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/domainpermissionsubscription.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-01-20 09:56:00 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-20 10:56:00 +0100
commit37fd7c7a6a991b03507a4a7d5235dad1d4e6a958 (patch)
tree379ca9362cc322516a282306f39ab52f29f89d78 /internal/gtsmodel/domainpermissionsubscription.go
parent[chore]: Bump github.com/gin-contrib/cors from 1.7.2 to 1.7.3 (#3661) (diff)
downloadgotosocial-37fd7c7a6a991b03507a4a7d5235dad1d4e6a958.tar.xz
[bugfix] Store LastModified for domain perm subs + send as If-Modified-Since (#3655)
Diffstat (limited to 'internal/gtsmodel/domainpermissionsubscription.go')
-rw-r--r--internal/gtsmodel/domainpermissionsubscription.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/gtsmodel/domainpermissionsubscription.go b/internal/gtsmodel/domainpermissionsubscription.go
index b6a0b8f43..724b2164f 100644
--- a/internal/gtsmodel/domainpermissionsubscription.go
+++ b/internal/gtsmodel/domainpermissionsubscription.go
@@ -34,7 +34,8 @@ type DomainPermissionSubscription struct {
FetchPassword string `bun:",nullzero"` // Password to send when doing a GET of URI using basic auth.
FetchedAt time.Time `bun:"type:timestamptz,nullzero"` // Time when fetch of URI was last attempted.
SuccessfullyFetchedAt time.Time `bun:"type:timestamptz,nullzero"` // Time when the domain permission list was last *successfuly* fetched, to be transmitted as If-Modified-Since header.
- ETag string `bun:"etag,nullzero"` // Etag last received from the server (if any) on successful fetch.
+ LastModified time.Time `bun:"type:timestamptz,nullzero"` // "Last-Modified" time received from the server (if any) on last successful fetch. Used for HTTP request caching.
+ ETag string `bun:"etag,nullzero"` // "ETag" header last received from the server (if any) on last successful fetch. Used for HTTP request caching.
Error string `bun:",nullzero"` // If latest fetch attempt errored, this field stores the error message. Cleared on latest successful fetch.
}