Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/pages-editor/domain/PreviewUrl

Pure (DOMAIN-001) Only http(s) URLs may be framed; returns the normalised URL or null.

Cockpit client (features), v0.8. Source: ui/client/features/pages-editor/domain/PreviewUrl.ts.

Functions#

isLocalPreviewUrl()#

isLocalPreviewUrl(url): boolean

Defined in: ui/client/features/pages-editor/domain/PreviewUrl.ts:14

The Cockpit previews the dev server of the project it opened, never a site elsewhere: only an address on this machine (localhost, 127.0.0.1, ::1, or a *.localhost name) may be framed.

Parameters#

url

string

Returns#

boolean


normalizePreviewUrl()#

normalizePreviewUrl(input): string | null

Defined in: ui/client/features/pages-editor/domain/PreviewUrl.ts:3

Only http(s) URLs may be framed; returns the normalised URL or null.

Parameters#

input

string

Returns#

string | null