#Global scope
62 messages Β· Page 1 of 1 (latest)
either you add the required paths dynamically in rust at runtime (eg app.fs_scope().allow_dir() ) or **/* should work as well if you're okay with us looking at you weird :P
why would you look at me weird π
btw
/home/fenish/.cache/dev.fenish.test/dynamic_folder2/d45b25012aa429abf783f27cd4b79efd.png
Unhandled Promise Rejection: forbidden path
my scope
"security": {
"csp": null,
"assetProtocol": {
"enable": true,
"scope": [
"$APPCONFIG/**/*",
"$APPCACHE/**/*",
"$APPDATA/**/*",
"*/**",
"**/*"
]
}
because we associate **/* with the people that say something like "security shouldn't be a concern" (but really we don't care (anymore) π€· )
π
it's the leading .
what?
can you be more clear please
no
okay thx
man chill i'm not that quick x)
no problem π
would be nice if that would be formatted more clearly lol
we both typed at the same time. we had conflict π
"security": {
"csp": null,
"assetProtocol": {
"enable": true,
"scope": {
"requireLiteralLeadingDot": "false",
"allow": [
"$APPCONFIG/**/*",
"$APPCACHE/**/*",
"$APPDATA/**/*",
"*/**",
"**/*"
]
}
}
``` from the link above:
> requireLiteralLeadingDot boolean | null Whether or not paths that contain components that start with a . will require that . appears literally in the pattern; *, ?, **, or [...] will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files. Defaults to true on Unix systems and false on Windows
as what i understand if i set it false i don't need to specify dot in the allow lsit
like the code you provide
yes
ah
hm
i guess i have a problem tho
π
isn't **/* includes all subfolders etc.
or i have to add **/**/*
/home/fenish/.cache/dev.fenish.test/dynamic_folder2/d45b25012aa429abf783f27cd4b79efd.
/\
||
i sometimes put folders outside identifier or basically my files inside child of child folder
**/* should include all subfolders, no matter how far they're nested
yea
Unhandled Promise Rejection: forbidden path: /home/fenish/.cache/dev.fenish.test2/lowres/d45b25012aa429abf783f27cd4b79efd.png
"scope": {
"requireLiteralLeadingDot": false,
"allow": [
"$APPCONFIG/**/*",
"$APPCACHE/**/*",
"$APPDATA/**/*",
"*/**",
"**/*",
if i use dev.fenist.test it works
that's an error you get when requesting something from the asset protocol?
huh
yes
i just define folder name
$APPCACHE = dev.fenish.test
and its inside .cache
if i use different folder than appcache
i can't reach with asset protocol
that's weird
does this happen with multiple files/paths or just this?
i tried this folders and none worked
/home/fenish/.cache/dev.fenish.test2/lowres/d45b25012aa429abf783f27cd4b79efd.png
/home/fenish/.cache/dev.fenish.test3/lowres/d45b25012aa429abf783f27cd4b79efd.png
/home/fenish/.cache/different/lowres/d45b25012aa429abf783f27cd4b79efd.png
but this works because this is APPCACHE dir
/home/fenish/.cache/dev.fenish.test/lowres/d45b25012aa429abf783f27cd4b79efd.png
hmm, i don't really have an idea. i've seen it work a few times on this server and use it in on of my bug testing app as well π€
this can't really be cached but maybe still try to delete the target dir and rebuild?
let me try
"security": {
"csp": null,
"assetProtocol": {
"enable": true,
"scope": {
"requireLiteralLeadingDot": false,
"allow": [
"$APPCONFIG/**/*",
"$APPCACHE/**/*",
"$APPDATA/**/*",
"*/**",
"**/*"
]
}
}
},
"withGlobalTauri": true
i deleted and i will try with these settings
technically it allows every file in my filesystem
nnaah
are you sure you are not using the fs plugin instead of the asset protocol?
https://v2.tauri.app/plugin/file-system/#examples btw @timber canyon do we want to move the tip at the bottom of the page more upwards?
also I think it may work if you only have the full glob in there
"assetProtocol": {
"enable": true,
"scope": {
"requireLiteralLeadingDot": false,
"allow": [
"**/*"
]
}
}
i tried second method but no result