@evanp/activitypub-bot 0.36.0 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/activitypubclient.js +7 -3
- package/package.json +1 -1
package/lib/activitypubclient.js
CHANGED
|
@@ -118,9 +118,13 @@ export class ActivityPubClient {
|
|
|
118
118
|
const headers = {
|
|
119
119
|
accept: ActivityPubClient.#accept,
|
|
120
120
|
date,
|
|
121
|
-
'user-agent': ActivityPubClient.#userAgent
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
'user-agent': ActivityPubClient.#userAgent
|
|
122
|
+
}
|
|
123
|
+
if (cached?.lastModified) {
|
|
124
|
+
headers['if-modified-since'] = cached.lastModified.toUTCString()
|
|
125
|
+
}
|
|
126
|
+
if (cached?.etag) {
|
|
127
|
+
headers['if-none-match'] = cached.etag
|
|
124
128
|
}
|
|
125
129
|
this.#logger.debug({ headers }, 'Sending headers')
|
|
126
130
|
const method = 'GET'
|