- Add specific allowedHosts configuration for Tailscale domains - Configure both Vite server and Hono dev server to accept .ts.net hosts - Add global middleware to Hono app for host acceptance - Allow master11.warbler-bearded.ts.net and all .ts.net subdomains
18 lines
372 B
TypeScript
18 lines
372 B
TypeScript
import { Hono } from "hono";
|
|
|
|
import { rpcApp } from "./routes/rpc";
|
|
import { clientEntry } from "./routes/client-entry";
|
|
|
|
const app = new Hono();
|
|
|
|
// Allow all hosts for Tailscale Funnel
|
|
app.use("*", async (c, next) => {
|
|
// Accept requests from any host
|
|
return next();
|
|
});
|
|
|
|
app.route("/rpc", rpcApp);
|
|
app.get("/*", clientEntry);
|
|
|
|
export default app;
|