mirror of
https://github.com/coder/code-server.git
synced 2026-11-24 20:17:15 +08:00
Require auth for mint key endpoint (#7923)
The client combines the key from this endpoint to then encrypt secrets into browser storage.
This commit is contained in:
1 parent
eb4ba56acb
commit
4f73664880
2 files changed
+15
-1
No files matched your search
@@ -210,7 +210,7 @@ router.get("/manifest.json", async (req, res) => {
|
||||
})
|
||||
|
||||
let mintKeyPromise: Promise<Buffer> | undefined
|
||||
router.post("/mint-key", async (req, res) => {
|
||||
router.post("/mint-key", ensureAuthenticated, async (req, res) => {
|
||||
if (!mintKeyPromise) {
|
||||
mintKeyPromise = new Promise(async (resolve) => {
|
||||
const keyPath = path.join(req.args["user-data-dir"], "serve-web-key-half")
|
||||
|
||||
Reference in new issue
Block a user