Skip to content
Merged
Show file tree
Hide file tree
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
86 changes: 43 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"typescript": "^5.5.4"
},
"dependencies": {
"@hocuspocus/extension-database": "^3.2.0",
"@hocuspocus/extension-logger": "^3.2.0",
"@hocuspocus/server": "^3.2.0"
"@hocuspocus/extension-database": "^2.13.5",
"@hocuspocus/extension-logger": "^2.13.6",
"@hocuspocus/server": "^2.13.5"
}
}
4 changes: 2 additions & 2 deletions src/hooks/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function parseProxyHeaders(requestHeaders: IncomingHttpHeaders): ProxyAuthHeader
}

export async function verifyYDocAccess(
{ documentName, requestHeaders, connectionConfig }: onAuthenticatePayload
{ documentName, requestHeaders, connection }: onAuthenticatePayload
): Promise<{} | ProxyAuthHeadersT> {
if (documentName.startsWith("test/")) return {}

Expand All @@ -48,7 +48,7 @@ export async function verifyYDocAccess(
if (data === "read-write") {
return proxyAuthHeaders
} else if (data === "read-only") {
connectionConfig.readOnly = true
connection.readOnly = true
return proxyAuthHeaders
} else {
throw new HocusPocusError("Access Denied")
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { verifyYDocAccess } from "./hooks/access"
import { downloadYDocContent } from "./hooks/download"
import { storeYDocContent } from "./hooks/store"

const server = new Server({
const server = Server.configure({
name: "xi.hocus",
port: 1234,
timeout: 30000,
Expand Down
Loading