mirror of
https://github.com/coder/code-server.git
synced 2025-08-01 19:30:05 +08:00
Add ripgrep, fill native fs functions, add ping endpoint (#39)
* Add ripgrep, fill native fs functions, add ping endpoint * Make show in folder redirect to the workspace
This commit is contained in:
@ -11,6 +11,7 @@ import * as httpolyglot from "httpolyglot";
|
||||
import * as https from "https";
|
||||
import * as mime from "mime-types";
|
||||
import * as net from "net";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import * as pem from "pem";
|
||||
import * as util from "util";
|
||||
@ -168,6 +169,11 @@ export const createApp = async (options: CreateAppOptions): Promise<{
|
||||
unauthStaticFunc(req, res, next);
|
||||
}
|
||||
});
|
||||
app.get("/ping", (req, res) => {
|
||||
res.json({
|
||||
hostname: os.hostname(),
|
||||
});
|
||||
});
|
||||
app.get("/resource/:url(*)", async (req, res) => {
|
||||
if (!ensureAuthed(req, res)) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user