backend-app-api: fix cookie delete response
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ describe('createCookieAuthRefreshMiddleware', () => {
|
||||
|
||||
it('should remove the user cookie', async () => {
|
||||
const response = await request(app).delete('/.backstage/auth/v1/cookie');
|
||||
expect(response.status).toBe(200);
|
||||
expect(response.status).toBe(204);
|
||||
expect(response.header['set-cookie'][0]).toMatch('backstage-auth=');
|
||||
});
|
||||
});
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ export function createCookieAuthRefreshMiddleware(options: {
|
||||
router.delete(WELL_KNOWN_COOKIE_PATH_V1, async (_, res) => {
|
||||
const credentials = await auth.getNoneCredentials();
|
||||
await httpAuth.issueUserCookie(res, { credentials });
|
||||
res.send(200);
|
||||
res.status(204).end();
|
||||
});
|
||||
|
||||
return router;
|
||||
|
||||
Reference in New Issue
Block a user