Skip to content

Commit 736ece4

Browse files
ascorbicclaude
andauthored
feat(pds): proxy unhandled XRPC requests to Bluesky AppView (#8)
Proxies unhandled XRPC requests to api.bsky.app, enabling AppView endpoints (feeds, profiles, notifications, DMs, moderation). Also adds stub endpoints for: - app.bsky.actor.getPreferences (returns empty preferences) - app.bsky.ageassurance.getState (returns assured status) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 278d6f7 commit 736ece4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/pds/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export { Sequencer } from "./sequencer";
66

77
import { Hono } from "hono";
88
import { cors } from "hono/cors";
9+
import { proxy } from "hono/proxy";
910
import { env } from "cloudflare:workers";
1011
import { ensureValidDid, ensureValidHandle } from "@atproto/syntax";
1112
import { requireAuth } from "./middleware/auth";
@@ -175,4 +176,12 @@ app.get("/xrpc/app.bsky.ageassurance.getState", requireAuth, (c) => {
175176
});
176177
});
177178

179+
// Proxy unhandled XRPC requests to Bluesky AppView
180+
app.all("/xrpc/*", (c) => {
181+
const url = new URL(c.req.url);
182+
url.host = "api.bsky.app";
183+
url.protocol = "https:";
184+
return proxy(url);
185+
});
186+
178187
export default app;

0 commit comments

Comments
 (0)