Skip to content

Commit cee1049

Browse files
committed
Edge cacheing
1 parent 3fa8a70 commit cee1049

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ fi`;
3939
const handler = (request, response) => {
4040
const { address } = request.query;
4141

42+
const one_month = 60 * 60 * 24 * 30;
43+
4244
response.setHeader('Content-Type', 'text/plain');
45+
response.setHeader('Cache-Control', `s-maxage=${one_month}`); // Cache at edge
4346
response.send(reverseShell(address));
4447
};
4548

0 commit comments

Comments
 (0)