MCPcopy Create free account
hub / github.com/langgenius/dify / isAllowedLocalDevOrigin

Function isAllowedLocalDevOrigin

packages/dev-proxy/src/server.ts:42–53  ·  view source on GitHub ↗
(origin?: string | null)

Source from the content-addressed store, hash-verified

40}
41
42export const isAllowedLocalDevOrigin = (origin?: string | null) => {
43 if (!origin)
44 return false
45
46 try {
47 const url = new URL(origin)
48 return LOCAL_DEV_HOSTS.has(url.hostname)
49 }
50 catch {
51 return false
52 }
53}
54
55export const isAllowedDevOrigin = (
56 origin?: string | null,

Callers 1

isAllowedDevOriginFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected