Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/opencode/src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export namespace Server {
.use((c, next) => {
const password = Flag.OPENCODE_SERVER_PASSWORD
if (!password) return next()
// Skip auth for WebSocket (PTY ID is the token)
if (c.req.header("upgrade")?.toLowerCase() === "websocket") return next()
const username = Flag.OPENCODE_SERVER_USERNAME ?? "opencode"
return basicAuth({ username, password })(c, next)
})
Expand Down