mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-09 10:14:26 +02:00
added a status check endpoint
This commit is contained in:
parent
68703ae300
commit
a3e4c8dcfd
@ -166,6 +166,9 @@ if (fs.existsSync('./.env') && process.env.selfURL && process.env.streamSalt &&
|
|||||||
app.get("/api", (req, res) => {
|
app.get("/api", (req, res) => {
|
||||||
res.redirect('/api/json')
|
res.redirect('/api/json')
|
||||||
});
|
});
|
||||||
|
app.get("/status", (req, res) => {
|
||||||
|
res.status(200).end()
|
||||||
|
});
|
||||||
app.get("/", (req, res) => {
|
app.get("/", (req, res) => {
|
||||||
res.sendFile(`${__dirname}/${findRendered(languageCode(req), req.header('user-agent') ? req.header('user-agent') : genericUserAgent)}`);
|
res.sendFile(`${__dirname}/${findRendered(languageCode(req), req.header('user-agent') ? req.header('user-agent') : genericUserAgent)}`);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user