Skip to content

Commit

Permalink
set Cache Control header to no-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyzollman committed Apr 9, 2023
1 parent fbe280f commit 14e6ba7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion backend/src/bootstrap/loaders/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ export default async () => {
return new ApolloServer({
schema,
cache: faultTolerantCache,
plugins: [responseCachePlugin(), ApolloServerPluginCacheControl({ calculateHttpHeaders: false })],
plugins: [responseCachePlugin(),
ApolloServerPluginCacheControl({ calculateHttpHeaders: false }),
{
async requestDidStart() {
return {
async willSendResponse(requestContext) {
requestContext.response.http.headers.set('Cache-Control', 'no-cache');
}
};
}
}
],
});
};

0 comments on commit 14e6ba7

Please sign in to comment.