supabase-community / chatgpt-your-files

Production-ready MVP for securely chatting with your documents using pgvector
https://youtu.be/ibzlEQmgPPY
338 stars 118 forks source link

Script SRC and embedding error -- Cross-Origin Resource Sharing (CORS) #43

Open autogro-ai opened 2 months ago

autogro-ai commented 2 months ago

Bug report

Describe the bug

Screenshot 2024-07-30 at 8 43 14 PM Screenshot 2024-07-30 at 8 45 11 PM

How do I enable Cross-Origin Resource Sharing (CORS) ? When I upload, the script isn't embedding, and when I try to chat I keep getting this script-src error

A clear and concise description of what the bug is. can't get this to give me a response due to this error

The Content Security Policy (CSP) prevents the evaluation of arbitrary strings as JavaScript to make it more difficult for an attacker to inject unathorized code on your site. To solve this issue, avoid using eval(), new Function(), setTimeout([string], ...) and setInterval([string], ...) for evaluating strings. If you absolutely must: you can enable string evaluation by adding unsafe-eval as an allowed source in a script-src directive. ⚠️ Allowing string evaluation comes at the risk of inline script injection. 1 directive Source location Directive Status script-src blocked

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

Additional context

Add any other context about the problem here.

Toby-exe commented 1 week ago

Having the same issue. @autogro-ai Did you ever find a solution ?