mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 23:06:40 +08:00
12 lines
275 B
TypeScript
12 lines
275 B
TypeScript
export const isDify = () => {
|
|
try {
|
|
const { hostname, protocol } = new URL(document.referrer)
|
|
return (
|
|
(protocol === 'https:' || protocol === 'http:') &&
|
|
(hostname === 'dify.ai' || hostname.endsWith('.dify.ai'))
|
|
)
|
|
} catch {
|
|
return false
|
|
}
|
|
}
|