# embedAllowed (@salmonui/rich-text)

> The embedAllowed function of @salmonui/rich-text: Whether an iframe src points at an allowed embed host. embedHosts entries are exact hostnames (www.youtube-nocookie.com) or *.example.com for any subdomain of example.com. Only http(s) URLs with no credentials and no backslashes qualify.

Canonical: https://salmonui.dev/docs/reference/rich-text/embedAllowed

```ts
import { embedAllowed } from '@salmonui/rich-text';
```

Entry index: https://salmonui.dev/docs/reference/rich-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text.md).

## Reference

Kind: function

```ts
function embedAllowed(src: string, embedHosts: readonly string[]): boolean;
```

Whether an iframe `src` points at an allowed embed host. `embedHosts`
entries are exact hostnames (`www.youtube-nocookie.com`) or `*.example.com`
for any subdomain of `example.com`. Only http(s) URLs with no credentials
and no backslashes qualify.
