Fix widget reply notification effects
This commit is contained in:
@@ -56,7 +56,10 @@ async function route(req, res) {
|
||||
if (req.method === "GET" && url.pathname === "/admin") return file(res, path.join(PUBLIC_DIR, "admin.html"), "text/html; charset=utf-8");
|
||||
if (req.method === "GET" && url.pathname === "/preview") return file(res, path.join(PUBLIC_DIR, "preview.html"), "text/html; charset=utf-8");
|
||||
if (req.method === "GET" && url.pathname.startsWith("/uploads/")) return serveUpload(res, url.pathname);
|
||||
if (req.method === "GET" && url.pathname === "/widget.js") return file(res, path.join(PUBLIC_DIR, "widget.js"), "application/javascript; charset=utf-8");
|
||||
if (req.method === "GET" && url.pathname === "/widget.js") {
|
||||
res.setHeader("Cache-Control", "no-store, max-age=0");
|
||||
return file(res, path.join(PUBLIC_DIR, "widget.js"), "application/javascript; charset=utf-8");
|
||||
}
|
||||
if (req.method === "GET" && url.pathname.startsWith("/admin.")) return servePublic(res, url.pathname);
|
||||
|
||||
if (url.pathname === "/api/admin/login" && req.method === "POST") return adminLogin(req, res);
|
||||
|
||||
Reference in New Issue
Block a user