Skip to content

Commit 88ff214

Browse files
committed
Run prettier
1 parent bccc4fa commit 88ff214

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/node/cli.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ export const options: Options<Required<UserProvidedArgs>> = {
253253
description: "GitHub authentication token (can only be passed in via $GITHUB_TOKEN or the config file).",
254254
},
255255
"proxy-domain": { type: "string[]", description: "Domain used for proxying ports." },
256-
"skip-auth-preflight": { type: 'boolean', description: "Allows preflight requests through proxy without authentication." },
256+
"skip-auth-preflight": {
257+
type: "boolean",
258+
description: "Allows preflight requests through proxy without authentication.",
259+
},
257260
"ignore-last-opened": {
258261
type: "boolean",
259262
short: "e",

src/node/routes/domainProxy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ router.all(/.*/, async (req, res, next) => {
6161

6262
ensureProxyEnabled(req)
6363

64-
if (req.method === "OPTIONS" && req.args['skip-auth-preflight']) {
64+
if (req.method === "OPTIONS" && req.args["skip-auth-preflight"]) {
6565
// Allow preflight requests with `skip-auth-preflight` flag
6666
return next()
6767
}

src/node/routes/pathProxy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function proxy(
2626
): Promise<void> {
2727
ensureProxyEnabled(req)
2828

29-
if (req.method === "OPTIONS" && req.args['skip-auth-preflight']) {
29+
if (req.method === "OPTIONS" && req.args["skip-auth-preflight"]) {
3030
// Allow preflight requests with `skip-auth-preflight` flag
3131
} else if (!(await authenticated(req))) {
3232
// If visiting the root (/:port only) redirect to the login page.

test/unit/node/proxy.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ describe("proxy", () => {
272272
it("should not allow OPTIONS without authentication by default", async () => {
273273
process.env.PASSWORD = "test"
274274
codeServer = await integration.setup(["--auth=password"])
275-
const resp = await codeServer.fetch(proxyPath, { method: "OPTIONS"})
275+
const resp = await codeServer.fetch(proxyPath, { method: "OPTIONS" })
276276
expect(resp.status).toBe(401)
277277
})
278278

279279
it("should allow OPTIONS with `skip-auth-preflight` flag", async () => {
280280
process.env.PASSWORD = "test"
281281
codeServer = await integration.setup(["--auth=password", "--skip-auth-preflight"])
282282
e.post("/wsup", (req, res) => {})
283-
const resp = await codeServer.fetch(proxyPath, { method: "OPTIONS"})
283+
const resp = await codeServer.fetch(proxyPath, { method: "OPTIONS" })
284284
expect(resp.status).toBe(200)
285285
})
286286
})

0 commit comments

Comments
 (0)