Skip to content

Commit 015e319

Browse files
committed
feat: add coder.com redirect
1 parent d81e245 commit 015e319

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/server/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ import { renderToString } from "react-dom/server";
55
// This must be exported for the dev server to work
66
export const app = new Hono();
77

8+
app.use("*", async (ctx, next) => {
9+
const url = new URL(ctx.req.url);
10+
if (url.hostname === "coder.app") {
11+
return ctx.redirect("https://coder.com");
12+
}
13+
14+
await next();
15+
});
816
app.route("/api", api);
917

1018
// Serves the main web application. This must come after the API route.

0 commit comments

Comments
 (0)