Fixed Loon Bug

This commit is contained in:
Peng-YM 2020-10-06 11:30:39 +08:00
parent 966d1e6ab9
commit 4cb8ba1af9
2 changed files with 14 additions and 10 deletions

View File

@ -106,17 +106,21 @@ $app.get("/api/env", async (req, res) => {
}); });
}); });
$app.route("/") $app.get("/", async (req, res) => {
.get(async (req, res) => { // 302 redirect
// 302 redirect res.set("location", "https://sub-store.vercel.app/").status(302).end();
res.set("location", "https://sub-store.vercel.app/").status(302).end(); });
})
.options(async (req, res) => { // handle preflight request for QX
if (ENV().isQX) {
$app.options("/", async (req, res) => {
res.status(200).end(); res.status(200).end();
}) })
.all(async (req, res) => { };
res.send("Hello from sub-store, made with ❤️ by Peng-YM");
}); $app.all("/", async (req, res) => {
res.send("Hello from sub-store, made with ❤️ by Peng-YM");
});
$app.start(); $app.start();

File diff suppressed because one or more lines are too long