Files
landscape-template/functions/logout/logout.js
2022-06-02 14:45:39 +03:00

21 lines
457 B
JavaScript

const cookie = require('cookie')
exports.handler = async (event, context) => {
const myCookie = cookie.serialize('Authorization', '', {
secure: true,
httpOnly: true,
path: '/',
maxAge: -1,
})
return {
statusCode: 200,
body: JSON.stringify({
status: 'OK',
}),
'headers': {
'Set-Cookie': myCookie,
'Cache-Control': 'no-cache',
}
}
};