test(ocme): lots of changes to get it working in production

This commit is contained in:
2025-03-24 15:31:31 -05:00
parent 0c5fc1dfb0
commit 6dd9ed848b
14 changed files with 957 additions and 779 deletions

View File

@@ -53,17 +53,17 @@ app.use(
);
// Middleware to normalize route case
app.use("*", async (c, next) => {
const lowercasedUrl = c.req.url.toLowerCase();
//console.log("Incoming Request:", c.req.url, c.req.method);
// If the URL is already lowercase, continue as usual
if (c.req.url === lowercasedUrl) {
return next();
}
// app.use("*", async (c, next) => {
// const lowercasedUrl = c.req.url.toLowerCase();
// //console.log("Incoming Request:", c.req.url, c.req.method);
// // If the URL is already lowercase, continue as usual
// if (c.req.url === lowercasedUrl) {
// await next();
// }
// Otherwise, re-route internally
return c.redirect(lowercasedUrl, 308); // 308 preserves the HTTP method
});
// // Otherwise, re-route internally
// return c.redirect(lowercasedUrl, 308); // 308 preserves the HTTP method
// });
app.doc("/api/ref", {
openapi: "3.0.0",