use an env var for configurable proxy header (#8863)

This commit is contained in:
hailey
2025-08-26 17:13:11 -07:00
committed by GitHub
parent 39c6984c6e
commit a1ed59e0ee
21 changed files with 108 additions and 41 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import {BskyAgent} from '@atproto/api'
import {useQuery} from '@tanstack/react-query'
import {Agent} from '../session/agent'
const RQKEY_ROOT = 'service'
export const RQKEY = (serviceUrl: string) => [RQKEY_ROOT, serviceUrl]
@@ -8,7 +9,7 @@ export function useServiceQuery(serviceUrl: string) {
return useQuery({
queryKey: RQKEY(serviceUrl),
queryFn: async () => {
const agent = new BskyAgent({service: serviceUrl})
const agent = new Agent(null, {service: serviceUrl})
const res = await agent.com.atproto.server.describeServer()
return res.data
},