Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embed mode is not working (PR #342) #385

Open
ntraut opened this issue Dec 19, 2023 · 2 comments
Open

embed mode is not working (PR #342) #385

ntraut opened this issue Dec 19, 2023 · 2 comments

Comments

@ntraut
Copy link
Member

ntraut commented Dec 19, 2023

i did a basic html file to test the embed mode:

<html>
    <header></header>
    <body>
        <iframe src="http://localhost:3001/project/testp/embed" allowfullscreen width="600" height="600" frameBorder="0" />
    </body>
</html>

if i open it directly i get the error:

node:internal/errors:478
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:387:5)
    at URL.onParseError (node:internal/url:565:9)
    at new URL (node:internal/url:641:5)
    at embed (/BrainBox3/controller/project/project.controller.js:722:22)

if i open it through http server i get the error:

  const disallowedDomains = req.user.authorizedHostsForEmbedding.split('\n') || [];

TypeError: Cannot read properties of undefined (reading 'authorizedHostsForEmbedding')
    at embed (/BrainBox3/controller/project/project.controller.js:723:38)

in both cases brainbox crashes after the error. error should at least be handled to avoid the crash.
i tried to add those hosts to my authorized hosts list but i still get the same errors:

localhost
127.0.0.1
@ntraut
Copy link
Member Author

ntraut commented Dec 20, 2023

i don't understand how the user authentication is supposed to work in embed mode, and what is the use of it. currently it is trying to read authorised hosts for the logged user, but no user is logged in embed mode...

@denishov
Copy link

Yes, I'm not sure eiter, there should not be any quthentication. I corrected that. I suppose I got confused retrieving the owner of the project.

dhovart pushed a commit to denishov/BrainBox that referenced this issue Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants