Skip to content

Commit

Permalink
Merge pull request #1872 from Inist-CNRS/fix-same-csv-export-between-…
Browse files Browse the repository at this point in the history
…two-tenant

Fix: add a Vary to fix same CSV export between two tenants
  • Loading branch information
slax57 authored Jan 30, 2024
2 parents 08ef37e + 54b6081 commit 677cbe5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/controller/api/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ app.use(
maxAge: config.cache.maxAge,
}),
);

app.use(async (ctx, next) => {
ctx.response.set('Vary', 'X-Lodex-Tenant');
await next();
});

app.use(route.get('/', getScripts));
app.use(route.get('/:scriptNameCalled', middlewareScript));
app.use(route.get('/:scriptNameCalled/*', middlewareScript));
Expand Down

0 comments on commit 677cbe5

Please sign in to comment.