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

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

Open
autogro-ai opened this issue Jul 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@autogro-ai
Copy link

autogro-ai commented Jul 31, 2024

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

  • OS: [e.g. macOS, Windows]
  • Mac OS X
  • Browser (if applies) [e.g. chrome, safari]
  • Brave
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

@autogro-ai autogro-ai added the bug Something isn't working label Jul 31, 2024
@autogro-ai autogro-ai changed the title Script SRC and embedding error Script SRC and embedding error -- Cross-Origin Resource Sharing (CORS) for next js Jul 31, 2024
@autogro-ai autogro-ai changed the title Script SRC and embedding error -- Cross-Origin Resource Sharing (CORS) for next js Script SRC and embedding error -- Cross-Origin Resource Sharing (CORS) Jul 31, 2024
@Toby-exe
Copy link

Toby-exe commented Oct 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants