test(ocme): cycle count intital improvements
This commit is contained in:
@@ -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"),
|
||||
// },
|
||||
// });
|
||||
// });
|
||||
|
||||
//---------------------------------------------------\\
|
||||
|
||||
|
||||
Reference in New Issue
Block a user