-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Describe the bug
It does not seem to be possible to configure a scope under allowlist > http which allows all ports on localhost.
Reproduction
- In
tauri.conf.jsonunder tauri > allowlist > http > scope add an empty array. - Insert scope value "http://**" in the empty array.
- Start Tauri
- In the application, make a HTTP request to
http://localhost:8080/api - The request is successful
- Change scope value to "http://localhost:**", start Tauri
- Behavior: Tauri does not start with error message
Malformed URI: invalid port number - Change scope value to "http://localhost", start Tauri
- Behavior: the request fails because
url not allowed on the configured scope: http://localhost:8080/api"
Expected behavior
It should be possible to configure a scope under allowlist > http which allows all ports on localhost so that Tauri starts and requests can be executed.
Platform and versions
Environment
› OS: Windows 10.0.22000 X64
› Webview2: 105.0.1343.33
› MSVC:
- Visual Studio Professional 2022
- Visual Studio Build Tools 2017
› Node.js: 16.16.0
› npm: 8.18.0
› pnpm: 6.11.0
› yarn: 1.22.15
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-pc-windows-msvc
Packages
› @tauri-apps/cli [NPM]: 1.0.5 (outdated, latest: 1.1.0)
› @tauri-apps/api [NPM]: 1.0.2 (outdated, latest: 1.1.0)
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:5173/
› framework: React
App directory structure
├─ .idea
├─ dist
├─ node_modules
├─ public
├─ src
└─ src-tauri
Stack trace
No response
Additional context
Trying to allow all local ports because port is assigned dynamically.