Skip to content

Commit

Permalink
try nextjs api cache prevention
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-gomez committed Sep 21, 2024
1 parent 3cdf5bd commit ef4645c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions booking-app/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ const nextConfig = {
}
return config;
},
async headers() {
return [
{
source: "/api/safety_training_users",
headers: [
{
key: "Cache-Control",
value: "no-store, max-age=0",
},
],
},
{
source: "/api/calendarEvents",
headers: [
{
key: "Cache-Control",
value: "no-store, max-age=0",
},
],
},
];
},
};

export default nextConfig;

0 comments on commit ef4645c

Please sign in to comment.