TypeScript API / @laikacms/server/oauth2 / processCustomLogo
Function: processCustomLogo()
ts
function processCustomLogo(customLogo, altText?): ProcessedLogo;Process a custom logo value into HTML.
- If undefined/empty, returns the built-in default logo
- If it's a URL (absolute), wraps it in an <img> tag and returns the origin for CSP
- Otherwise, returns the value as-is (assumed to be inline HTML/SVG)
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
customLogo | string | undefined | undefined | The custom logo value (URL or HTML) |
altText | string | 'Logo' | Alt text for the image (default: 'Logo') |
Returns
ProcessedLogo with html and imgSrc for CSP