@@ -3,8 +3,9 @@ import { promises as fs } from "fs"
3
3
import { RateLimiter as Limiter } from "limiter"
4
4
import * as os from "os"
5
5
import * as path from "path"
6
+ import { CookieKeys } from "../../common/http"
6
7
import { rootPath } from "../constants"
7
- import { authenticated , Cookie , getCookieDomain , redirect , replaceTemplates } from "../http"
8
+ import { authenticated , getCookieDomain , redirect , replaceTemplates } from "../http"
8
9
import { getPasswordMethod , handlePasswordValidation , humanPath , sanitizeString , escapeHtml } from "../util"
9
10
10
11
// RateLimiter wraps around the limiter library for logins.
@@ -83,7 +84,7 @@ router.post<{}, string, { password: string; base?: string }, { to?: string }>("/
83
84
if ( isPasswordValid ) {
84
85
// The hash does not add any actual security but we do it for
85
86
// obfuscation purposes (and as a side effect it handles escaping).
86
- res . cookie ( Cookie . SessionKey , hashedPassword , {
87
+ res . cookie ( CookieKeys . Session , hashedPassword , {
87
88
domain : getCookieDomain ( req . headers . host || "" , req . args [ "proxy-domain" ] ) ,
88
89
// Browsers do not appear to allow cookies to be set relatively so we
89
90
// need to get the root path from the browser since the proxy rewrites
0 commit comments