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');
22
33var WebView = {
44 convertFileSrc : function ( url ) {
5+ const convertHttp = ! location . protocol . startsWith ( "http" ) && ! location . protocol . startsWith ( "https" )
6+
57 if ( ! url ) {
68 return url ;
79 }
@@ -11,10 +13,10 @@ var WebView = {
1113 if ( url . startsWith ( 'file://' ) ) {
1214 return window . WEBVIEW_SERVER_URL + url . replace ( 'file://' , '/_app_file_' ) ;
1315 }
14- if ( url . startsWith ( 'http://' ) ) {
16+ if ( url . startsWith ( 'http://' ) && convertHttp ) {
1517 return window . WEBVIEW_SERVER_URL + url . replace ( 'http://' , '/_http_proxy_' ) ;
1618 }
17- if ( url . startsWith ( 'https://' ) ) {
19+ if ( url . startsWith ( 'https://' ) && convertHttp ) {
1820 return window . WEBVIEW_SERVER_URL + url . replace ( 'https://' , '/_https_proxy_' ) ;
1921 }
2022 if ( url . startsWith ( 'content://' ) ) {
You can’t perform that action at this time.
0 commit comments