How to use CSP to allow access to http://localhost from a webview loaded with https #11970
Unanswered
cngarrison
asked this question in
Q&A
Replies: 1 comment
-
This is not CSP related (Also, the csp config is only applied to the files from your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm unable to load http content in the app I'm developing. To isolate the problem I created a new Tauri app.
The new app is to test loading http content from a webview with content loaded via https. I can't find the right configuration.
This is a new Vanilla JS app. I created a test page to load via https at https://www.cngarrison.com/localhost-status.html.
That page is being loaded in a new webview using:
tauri.conf.json
has CSP rules:I am expecting the
http:
directive to allow the webview to load a page served by http://localhost but I get an error in the console:[blocked] The page at https://www.cngarrison.com/localhost-status.html was not allowed to display insecure content from http://localhost:3162/api/v1/status.
I have tried various
csp
rules, but I can't get the right config.What am I doing wrong? What is the needed config to allow an https page to load content from http?
Beta Was this translation helpful? Give feedback.
All reactions