fix: improve error caching behavoir (#2211)
This commit ensures that the GraphQL Pat error is not cached in any browser. See https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282630614.
This commit is contained in:
1 parent
dcc4ccd18c
commit
98f9045f98
5 files changed
+5
-5
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ export default async (req, res) => {
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
res.setHeader("Cache-Control", `no-store`); // Don't cache error responses.
|
||||
res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses.
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user