mirror of
https://github.com/appy-one/acebase-server.git
synced 2026-06-30 06:02:05 -06:00
11 lines
No EOL
362 B
JavaScript
11 lines
No EOL
362 B
JavaScript
export const addMiddleware = (env) => {
|
|
env.app.use((req, res, next) => {
|
|
// Disable cache for GET requests to make sure browsers do not use cached responses
|
|
if (req.method === 'GET') {
|
|
res.setHeader('Cache-Control', 'no-cache');
|
|
}
|
|
next();
|
|
});
|
|
};
|
|
export default addMiddleware;
|
|
//# sourceMappingURL=cache.js.map
|