Skip to content

Commit

Permalink
version 1.40.0-rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Oct 1, 2021
2 parents f5e4e36 + 5d2f4d1 commit 977b48b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/api/files/jsRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const routes = app => {
return '/api/public';
},
proxyReqOptDecorator(proxyReqOpts) {
const { tenant, ...headers } = proxyReqOpts.headers;
const { tenant, cookie, ...headers } = proxyReqOpts.headers;
return {
...proxyReqOpts,
headers: { ...headers },
Expand Down
10 changes: 7 additions & 3 deletions app/api/files/specs/jsRoutes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,25 @@ describe('upload routes', () => {
await remoteServer.close();
});

it('should return the captcha and store it', done => {
it('should remove the tenant and cookie from headers', done => {
remoteApp = express();
remoteApp.post('/api/public', (_req, res) => {
res.json(_req.headers);
});

remoteServer = remoteApp.listen(54321, async () => {
const response = await request(app)
.post('/api/remotepublic')
.send({ title: 'Title' })
.set(
'cookie',
'locale=en; SL_G_WPT_TO=en; connect.sid=s%3AnK04AiZIYyWOjO_p.kFF17AeJhqKr207n95pV8'
)
.set('tenant', 'tenant')
.expect(200);

const headersOnRemote = JSON.parse(response.text);
expect(headersOnRemote.tenant).not.toBeDefined();
expect(headersOnRemote.tenant).toBeUndefined();
expect(headersOnRemote.cookie).toBeUndefined();
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uwazi",
"version": "1.40.0-rc3",
"version": "1.40.0-rc4",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"keywords": [
"react"
Expand Down

0 comments on commit 977b48b

Please sign in to comment.