0
0
mirror of https://github.com/dobin/lxd-webgui synced 2025-10-05 23:52:43 +02:00

Always send without with-credentials header for addremoteimage

This should fix a bug in firefox that when you access a remote
LXD server, the withCredentials flag is also beeing sent. This
will result in empty responses and missing data.
This commit is contained in:
Dobin Rutishauser
2016-08-30 20:39:07 +02:00
parent 0da9aeccd1
commit ac1d062c2c

View File

@@ -21,10 +21,10 @@ angular.module('myApp.remoteimage')
obj.downloadRemoteimageListImages = function() {
var url = "https://images.linuxcontainers.org/";
return $http.get("https://images.linuxcontainers.org/1.0/images", {cache: true}).then(function(data) {
return $http.get("https://images.linuxcontainers.org/1.0/images", {withCredentials:false, cache: true}).then(function(data) {
var promises = data.data.metadata.map(function(imageUrl) {
return $http.get(url + imageUrl, {cache: true}).then(function(resp) {
return $http.get(url + imageUrl, {withCredentials: false, cache: true}).then(function(resp) {
resp.data.metadata.source = 'images';
resp.data.metadata.sourceUrl = url;
resp.data.metadata.sourceProto = 'lxd';