Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 9f96b9d

Browse files
authored
Merge pull request #4153 from withspectrum/fix-hyperion-context
Add image expiration context to hyperion schemalink
2 parents 5a9f8b1 + fe28e6b commit 9f96b9d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hyperion/renderer/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const renderer = (req: express$Request, res: express$Response) => {
5050
context: {
5151
user: req.user || null,
5252
loaders: createLoaders(),
53+
getImageSignatureExpiration: () => {
54+
// see api/apollo-server.js
55+
const date = new Date();
56+
date.setHours(24);
57+
date.setMinutes(0);
58+
date.setSeconds(0);
59+
date.setMilliseconds(0);
60+
return date.getTime();
61+
},
5362
},
5463
});
5564

0 commit comments

Comments
 (0)