refactor: add cookie.ts to lib/vscode

This commit is contained in:
Joe Previte
2021-03-17 16:08:25 -07:00
parent 9f790fd2f3
commit 5cec6208d0
3 changed files with 5 additions and 4 deletions

View File

@@ -3,14 +3,11 @@ import { promises as fs } from "fs"
import { RateLimiter as Limiter } from "limiter"
import * as path from "path"
import safeCompare from "safe-compare"
import { Cookie } from "../../../lib/vscode/src/vs/server/common/cookie"
import { rootPath } from "../constants"
import { authenticated, getCookieDomain, redirect, replaceTemplates } from "../http"
import { hash, humanPath } from "../util"
export enum Cookie {
Key = "key",
}
// RateLimiter wraps around the limiter library for logins.
// It allows 2 logins every minute and 12 logins every hour.
class RateLimiter {