File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ var exec = require('cordova/exec');
2
2
3
3
var WebView = {
4
4
convertFileSrc : function ( url ) {
5
+ const convertHttp = ! location . protocol . startsWith ( "http" ) && ! location . protocol . startsWith ( "https" )
6
+
5
7
if ( ! url ) {
6
8
return url ;
7
9
}
@@ -11,10 +13,10 @@ var WebView = {
11
13
if ( url . startsWith ( 'file://' ) ) {
12
14
return window . WEBVIEW_SERVER_URL + url . replace ( 'file://' , '/_app_file_' ) ;
13
15
}
14
- if ( url . startsWith ( 'http://' ) ) {
16
+ if ( url . startsWith ( 'http://' ) && convertHttp ) {
15
17
return window . WEBVIEW_SERVER_URL + url . replace ( 'http://' , '/_http_proxy_' ) ;
16
18
}
17
- if ( url . startsWith ( 'https://' ) ) {
19
+ if ( url . startsWith ( 'https://' ) && convertHttp ) {
18
20
return window . WEBVIEW_SERVER_URL + url . replace ( 'https://' , '/_https_proxy_' ) ;
19
21
}
20
22
if ( url . startsWith ( 'content://' ) ) {
You can’t perform that action at this time.
0 commit comments