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

[bug] How do I disable CSP #9827

Closed
dong0926 opened this issue May 20, 2024 · 1 comment
Closed

[bug] How do I disable CSP #9827

dong0926 opened this issue May 20, 2024 · 1 comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@dong0926
Copy link

Describe the bug

I'm running windows.I need to manipulate the DOM of a different source iframe inside the html.

@tauri-apps/tauri-docs#26

I'm using the scheme here.

{
  "tauri": {
    "windows": [
      {
        "fullscreen": false,
        "resizable": true,
        "title": "title",
        "width": 800,
        "height": 600,
        "additionalBrowserArgs": "--disable-web-security"
      }
    ]
  }
}

But the command line displays an error:
failed to create webview: WebView2 error: WindowsError(Error { code: 0x8007139F, message: The state of the group or resource is not the correct state to perform the requested operation。 })

I know it's not safe.
But my scenario does require disabling CSP.
What should I do?

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 124.0.2478.97
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.20.2
    - pnpm: 8.15.7
    - yarn: 1.22.22
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 1.6.5
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.9
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.5 (outdated, latest: 1.5.6)
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: default-src 'self'; img-src 'self' asset: https://asset.localhost;
    - distDir: ../dist
    - devPath: ../dist
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

@dong0926 dong0926 added status: needs triage This issue needs to triage, applied to new issues type: bug labels May 20, 2024
@amrbashir
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants