test(ocme): cycle count intital improvements

This commit is contained in:
2025-03-19 21:45:10 -05:00
parent e17b8e7bbe
commit 7a22b52c91
19 changed files with 709 additions and 33 deletions

View File

@@ -88,32 +88,32 @@ const appRoutes = routes.forEach((route) => {
app.route("/api/", route);
});
app.route("/ocme/*", ocme);
app.route("/ocme/", ocme);
//--------------- lst v1 proxy ----------------------\\
app.all("/api/v1/*", (c) => {
const path = c.req.path.replace("/api/v1/", ""); // Extract the subpath
const query = c.req.query() ? "?" + new URLSearchParams(c.req.query()).toString() : ""; // Get query params
return proxy(`http://localhost:4900/${path}${query}`, {
headers: {
...c.req.header(),
"X-Forwarded-For": "127.0.0.1",
"X-Forwarded-Host": c.req.header("host"),
},
});
});
// app.all("/api/v1/*", (c) => {
// const path = c.req.path.replace("/api/v1/", ""); // Extract the subpath
// const query = c.req.query() ? "?" + new URLSearchParams(c.req.query()).toString() : ""; // Get query params
// return proxy(`http://localhost:4900/${path}${query}`, {
// headers: {
// ...c.req.header(),
// "X-Forwarded-For": "127.0.0.1",
// "X-Forwarded-Host": c.req.header("host"),
// },
// });
// });
app.all("/system/*", (c) => {
const path = c.req.path.replace("/system/", ""); // Extract the subpath
const query = c.req.query() ? "?" + new URLSearchParams(c.req.query()).toString() : ""; // Get query params
return proxy(`http://localhost:4200/${path}${query}`, {
headers: {
...c.req.header(),
"X-Forwarded-For": "127.0.0.1",
"X-Forwarded-Host": c.req.header("host"),
},
});
});
// app.all("/system/*", (c) => {
// const path = c.req.path.replace("/system/", ""); // Extract the subpath
// const query = c.req.query() ? "?" + new URLSearchParams(c.req.query()).toString() : ""; // Get query params
// return proxy(`http://localhost:4200/${path}${query}`, {
// headers: {
// ...c.req.header(),
// "X-Forwarded-For": "127.0.0.1",
// "X-Forwarded-Host": c.req.header("host"),
// },
// });
// });
//---------------------------------------------------\\