#need help
26 messages · Page 1 of 1 (latest)
try a debug build instead by doing tauri build --debug - if you use npm don't forget the extra --: npm run tauri build -- --debug
The app will end up in target/debug/ (it's not the same as tauri dev though)
I can't launch exe from debug. Writes Refused to connect to the site localhost.
looks like it's trying to run itself via localhost like on dev but something goes wrong
and you rebuilt the app with tauri build --debug before trying to start it?
yes
because then it shouldn't try to connect to localhost unless it also does so in your target/release app
yeah, that's wrong
you're missing the extra -- i wrote above
npm run tauri build -- --debug
without it npm doesn't forward the arg to tauri so tauri is still building a release build
it looks like my application is completely broken due to an error in the security policy
index-d31c10c4.js:9388 Refused to connect to 'http://laravel-4.ru/api/connect/sanctum/csrf-cookie' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
your advice with debug helped, thanks, can you also tell me how to fix the policies?
it turns out now my application cannot send requests to api
I take it this is the fault?
"security": {
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost"
},
yes
maybe something like this ```json
"csp": "default-src 'self'; img-src 'self' data: asset: https://asset.localhost/; connect-src http://laravel-4.ru"
after that it will complain about the http url though, a mixed content warning -> https://github.com/tauri-apps/tauri/issues/3007
Is it possible to disable this check in the security policy while I'm testing?
index-f340fd63.js:9388 Mixed Content: The page at 'https://tauri.localhost/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://laravel-4.ru/api/connect/sanctum/csrf-cookie'. This request has been blocked; the content must be served over HTTPS.
I indicated here http but it does not help
it would be great to temporarily disable checking for ssl
nope, that's built into the browser/webview and we can't disable that without changing the origin, see the issue i linked above