Skip to content

iFrame Script Source URL #163

@megabyte0x

Description

@megabyte0x

Disclaimer: I am not sure how important this issue is 😅

Problem

Currently, in the packages/utils/renderer/services/embed.ts the script src is constant that is, /js/iframe-resizer.js which do not work if NEXT_PUBLIC_BASE_URL is defined.

Potential Solution

Make the script.src dynamic with NEXT_PUBLIC_BASE_URL

const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || '';

script.src = BASE_URL == '' ? `/js/iframe-resizer.js` : `${BASE_URL}/js/iframe-resizer.js`;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions