/
githubmirror
/
code-server
Обзор
Документация
Войти
/
githubmirror
/
code-server
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/node/routes/logout.ts
13 строк
523 B
Timon Fiedler
Add cookie-suffix flag (#7590)
12 дек 2025, 04:23
Не верифицирован
12 дек 2025, 04:23
68ac95b
Код
Авторство
О чём код?
import { Router } from "express" import { getCookieOptions, redirect } from "../http" import { sanitizeString } from "../util" export const router = Router() router.get<{}, undefined, undefined, { base?: string; to?: string }>("/", async (req, res) => { // Must use the *identical* properties used to set the cookie. res.clearCookie(req.cookieSessionName, getCookieOptions(req)) const to = sanitizeString(req.query.to) || "/" return redirect(req, res, to, { to: undefined, base: undefined, href: undefined }) })