summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-02-24 07:30:10 -0500
committerPliable Pixels <pliablepixels@gmail.com>2019-02-24 07:30:10 -0500
commit780af74c266b5531905d6890232685e5e5368571 (patch)
treee6cfbf9858a9975faf84b415e93d308e4b937512 /www/js/app.js
parenta7eb5ec2141c585c7d4eba7a49290d5cf1abe560 (diff)
nits
Diffstat (limited to 'www/js/app.js')
-rwxr-xr-xwww/js/app.js39
1 files changed, 5 insertions, 34 deletions
diff --git a/www/js/app.js b/www/js/app.js
index ffd456fe..9e9b61ad 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -651,50 +651,21 @@ angular.module('zmApp', [
if (!config) return config;
if (!config.url) return config;
-
-
if ($rootScope.basicAuthHeader) {
- // console.log ("BASIC AUTH="+$rootScope.basicAuthHeader);
+
config.headers.Authorization = $rootScope.basicAuthHeader;
}
-
// handle basic auth properly
if (config.url.indexOf("@") > -1) {
NVR.debug(">>>>>>>>>> ERROR!!!!! url has a basic auth u:p!" + config.url);
- /* var components = URI.parse(config.url);
- var credentials = btoa(components.userinfo);
- var authorization = {'Authorization': 'Basic ' + credentials};
- config.headers.Authorization = 'Basic ' + credentials;
- console.log ("Full headers: " + JSON.stringify(config.headers));
- config.url = components.scheme + "://" + components.host;
- if (components.port) config.url = config.url + ":" + components.port;
- if (components.path) config.url = config.url + components.path;
-
- console.log ("REWRITING URL TO: "+config.url);} */
-
-
-
- //console.log (">>>>>>>>>>>>> INTERCEPT OBJECT " + JSON.stringify(config));
-
- // if ($rootScope.zmCookie) {
- // config.headers.Cookie = "ZMSESSID=" + // $rootScope.zmCookie;
- // console.log (">>>>> WOOOT HAVE COOKIE AND USING: "+$rootScope.zmCookie);
- // } else {
- // console.log ("No cookie present in " + config.url);
- // }
-
- // if ($rootScope.apiAuth) {
- // console.log("********** API AUTH");
- /*if (config.url.indexOf("/api/") > -1) {
- config.url = config.url + "&auth=" + $rootScope.authSession;*/
- // console.log("********** API AUTH muggled to:" + config.url);
-
- // }
}
+ // I don't think we need this - do we?
+
+ /*
if ((config.url.indexOf("/api/states/change/") > -1) ||
(config.url.indexOf("getDiskPercent.json") > -1) ||
(config.url.indexOf("daemonCheck.json") > -1) ||
@@ -705,7 +676,7 @@ angular.module('zmApp', [
// these can take time, so lets bump up timeout
config.timeout = zm.largeHttpTimeout;
- }
+ }*/
return config;
},