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

Unable to restrict allowlist because of missing features in Rust #1023

Closed
crapStone opened this issue Sep 22, 2020 · 3 comments
Closed

Unable to restrict allowlist because of missing features in Rust #1023

crapStone opened this issue Sep 22, 2020 · 3 comments

Comments

@crapStone
Copy link
Contributor

crapStone commented Sep 22, 2020

Describe the bug
I want to use the Bridge-Pattern with a few more options enabled.

I enabled all options i wanted by reading the documentation:

"allowlist": {
    "all": false,
    "event": true,
    "open": true,
    "openDialog": true
}

When i tried to use the http module from tauri this error was printed:

[ERROR] "httpRequest' not on the allowlist (https://tauri.studio/docs/api/config#tauri.allowlist)"

This option isn't in the docs but tried anyway and now cargo printed the following error:

error: failed to select a version for `tauri`.
    ... required by package `<application_name> v0.1.0 (<application_path>/src-tauri)`
versions that meet the requirements `=0.9.2` are: 0.9.2

the package `<application_name>` depends on `tauri`, with features: `http-request` but `tauri` does not have these features.


failed to select a version for `tauri` which could resolve this conflict

To Reproduce
Steps to reproduce the behavior:

  1. Go to src-tauri/tauri.conf.json
  2. Add "httpRequest": true, to tauri:allowlist
  3. Use for example:
import http from 'tauri/api/http'
http.get('https://google.com')
  1. Start tauri application
  2. Look at the output of tauri dev

Expected behavior
When I add the httpRequest option to the allow list I want the application to compile and the ability to use the http module from JavaScript.

Platform and Versions:
OS: Linux(5.8.10-arch1-1) - linux/x64
Node: 14.11.0
NPM: 6.14.7
Yarn: 1.22.5
Rustc: 1.46.0

@u12206050
Copy link

Have you tried with tiny_http?

@crapStone
Copy link
Contributor Author

I want to make requests in JavaScript with the builtin http api from tauri.

@lucasfernog
Copy link
Member

I'll fix this tonight. For now you could use all: true

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

3 participants