forget it for now

This commit is contained in:
Chris Wanstrath 2025-09-24 10:39:23 -07:00
parent c7fa05f224
commit ab47945222
2 changed files with 0 additions and 22 deletions

View File

@ -2,14 +2,3 @@
don't ask don't ask
## basic auth
users:
- corey
- defunkt
- spike
password:
- 888

View File

@ -1,6 +1,5 @@
import { Hono } from "hono" import { Hono } from "hono"
import { upgradeWebSocket, websocket } from "hono/bun" import { upgradeWebSocket, websocket } from "hono/bun"
import { basicAuth } from "hono/basic-auth"
import { uniqueNamesGenerator, adjectives, animals } from "unique-names-generator" import { uniqueNamesGenerator, adjectives, animals } from "unique-names-generator"
type Request = { type Request = {
@ -31,16 +30,6 @@ const app = new Hono
app.get("/health", c => c.text("ok")) app.get("/health", c => c.text("ok"))
const users = ["corey", "defunkt", "spike"]
const password = "888"
if (process.env.NODE_ENV === "production") {
app.use(basicAuth({
verifyUser: (username, pass) =>
users.includes(username) && password === pass
}))
}
app.get("/tunnels", c => { app.get("/tunnels", c => {
return c.html(<ul> return c.html(<ul>
{Object.keys(connections).map(key => {Object.keys(connections).map(key =>