Anyone able to get an Electron app working with CORS

I cannot get past this.

Refused to connect to 'http://localhost:8100/api/v1/auth/login' because it violates the following Content Security Policy directive: 
"default-src capacitor-electron://* 'unsafe-inline' devtools://* 'unsafe-eval' data:". 
Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.

I’ve tried multiple values in origin.

    "origin": [
      "capacitor-electron://localhost",
      "capacitor-electron://*",
      "capacitor-electron://-",
      "capacitor://localhost"
]
1 Like

did you manage to solve the problem? I find myself in the same situation

1 Like

@Rubens_Bentes_da_Sil see STEP 7 - Electron setup in this post.

It worked out! Thank you very much!!!

1 Like