mirror of https://git.tuxpa.in/a/code-server.git
Simplify query concatenation in URL callback
Cases in URLs like ?&a=b or ?a=b& appear to be handled just fine.
This commit is contained in:
parent
d14c2e5bb7
commit
5f7f7f1a92
|
@ -151,7 +151,7 @@ router.get("/callback", ensureAuthenticated, async (req, res) => {
|
||||||
scheme: getFirstString(req.query["vscode-scheme"]) || "code-oss",
|
scheme: getFirstString(req.query["vscode-scheme"]) || "code-oss",
|
||||||
authority: getFirstString(req.query["vscode-authority"]),
|
authority: getFirstString(req.query["vscode-authority"]),
|
||||||
path: getFirstString(req.query["vscode-path"]),
|
path: getFirstString(req.query["vscode-path"]),
|
||||||
query: (getFirstString(req.query.query) ? getFirstString(req.query.query) + "&" : "") + qs.stringify(query),
|
query: (getFirstString(req.query.query) || "") + "&" + qs.stringify(query),
|
||||||
fragment: getFirstString(req.query["vscode-fragment"]),
|
fragment: getFirstString(req.query["vscode-fragment"]),
|
||||||
},
|
},
|
||||||
// Make sure the map doesn't leak if nothing fetches this URI.
|
// Make sure the map doesn't leak if nothing fetches this URI.
|
||||||
|
|
Loading…
Reference in New Issue