T
Typebot12mo ago
Tao Wang

Bugs (avatar upload and CORS)

There are two bugs: - The allowed origin is not working. I can still embed the chatbot on other domains and chat with it. - The image upload is not working. I can not upload Bot Avatar via file upload. I have to server my image via jsdelivr and insert the link.
10 Replies
Baptiste
Baptiste12mo ago
Image upload is working fine on my end! Can you record a video? Can you provide an example of a site that has a bot which should not be able to start?
Tao Wang
Tao WangOP12mo ago
OpenAI Assistant Chat
OpenAI Assistant Chat
Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form.
Tao Wang
Tao WangOP12mo ago
Tao Wang
Tao WangOP12mo ago
it shouldn't appear on w3school because i specified https://skillup.day as allowed domain
Tao Wang
Tao WangOP12mo ago
image upload is working now.
Baptiste
Baptiste12mo ago
Oh right That's because you are embedding using an iframe here So the request origin is typebot.co which is allowed I wonder if I can prevent iframe embedding as well 🤔 Indeed, if embedded iframe’s origin is the same as the API’s origin, requests won't be blocked due to CORS So the allowed origins mechanism work only if you try to embed the bot with the embed library (not iframe) I can add a mechanism to disallow this 🙂 Thanks for reporting this!
Tao Wang
Tao WangOP12mo ago
Content Security Policy: frame-ancestors example.com; This cloud solve it.
Baptiste
Baptiste12mo ago
It will be hard to enforce all this from the server. The best I can do for now is to do client-side check on origins
Baptiste
Baptiste12mo ago
Will deploy that next monday 👍

Did you find this page helpful?