about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorhailey <hailey@blueskyweb.xyz>2025-08-26 17:13:11 -0700
committerGitHub <noreply@github.com>2025-08-26 17:13:11 -0700
commita1ed59e0eeb03d1f587512a1e567ebc298d71b38 (patch)
tree4c0beabb5682153bb9fbf1e3b682201ddfcdb6ca /src/lib
parent39c6984c6edabcb432ef884e7d3b12ae51a2c09e (diff)
downloadvoidsky-a1ed59e0eeb03d1f587512a1e567ebc298d71b38.tar.zst
use an env var for configurable proxy header (#8863)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/constants.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index d81b68db6..727d4b052 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -1,6 +1,9 @@
 import {type Insets, Platform} from 'react-native'
 import {type AppBskyActorDefs} from '@atproto/api'
 
+import {type ProxyHeaderValue} from '#/state/session/agent'
+import {BLUESKY_PROXY_DID, CHAT_PROXY_DID} from '#/env'
+
 export const LOCAL_DEV_SERVICE =
   Platform.OS === 'android' ? 'http://10.0.2.2:2583' : 'http://localhost:2583'
 export const STAGING_SERVICE = 'https://staging.bsky.dev'
@@ -211,6 +214,16 @@ export const PUBLIC_STAGING_APPVIEW_DID = 'did:web:api.staging.bsky.dev'
 
 export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
 
+export const BLUESKY_PROXY_HEADER: ProxyHeaderValue = `${BLUESKY_PROXY_DID}#bsky_appview`
+
+export const BLUESKY_SERVICE_HEADERS = {
+  'atproto-proxy': BLUESKY_PROXY_HEADER,
+}
+
+export const DM_SERVICE_HEADERS = {
+  'atproto-proxy': `${CHAT_PROXY_DID}#bsky_chat`,
+}
+
 export const webLinks = {
   tos: `https://bsky.social/about/support/tos`,
   privacy: `https://bsky.social/about/support/privacy-policy`,