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

Edge Console Refused to connect because it violates the Document Security Policy #2804

Closed
cesarorosco opened this issue Aug 25, 2023 · 1 comment

Comments

@cesarorosco
Copy link

Edge Version: 116.0.1938.54 (Compilación oficial) (64 bits)

The following script in the console give the message:
"Refused to connect to '' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback."
"Refused to connect to 'http://localhost:8080/api/v1/product/' because it violates the document's Content Security Policy.

`const response = await fetch('http://localhost:8080/api/v1/product/', {
method: 'GET'
})
imagen

console.log(await response.json())`

In chrome works ok. I also try to add the headers: Content-Security-Policy': default-src 'self' but it doesn't work.
In the network console there is no request to the server.

@captainbrosset
Copy link
Contributor

Hi, thank you for reaching out.

This repository is for technical documentation only. If I'm understanding your issue correctly, you don't need help with documentation, but with DevTools, or with Edge itself. Which means, here is not the right place for this issue.

I'm not exactly sure what the issue is, but I can offer two suggestions:

  1. If you think your code is correct, and it works in Chrome, but not in Edge, and you suspect a web compatibility issue, then you should report this bug to Edge directly. Here's how:

    1. Click Settings and more (the ... button in the top-right corner of the browser).
    2. Click Help and feedback.
    3. Click Send feedback.
  2. If, instead, you need help with this specific error message in the Console, and you think the Console could do a better job at explaining it, then I suggest sending this to the DevTools team. Here's how:

    1. Go to https://github.com/MicrosoftEdge/DevTools/issues/
    2. Open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants