MCPcopy Index your code
hub / github.com/anomalyco/opencode / shouldAttachShareAuthHeaders

Function shouldAttachShareAuthHeaders

packages/opencode/src/cli/cmd/import.ts:33–39  ·  view source on GitHub ↗
(shareUrl: string, accountBaseUrl: string)

Source from the content-addressed store, hash-verified

31}
32
33export function shouldAttachShareAuthHeaders(shareUrl: string, accountBaseUrl: string): boolean {
34 try {
35 return new URL(shareUrl).origin === new URL(accountBaseUrl).origin
36 } catch {
37 return false
38 }
39}
40
41/**
42 * Transform ShareNext API response (flat array) into the nested structure for local file storage.

Callers 2

import.test.tsFile · 0.90
import.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected