diff --git a/flatisfy/web/js_src/api/index.js b/flatisfy/web/js_src/api/index.js index 3b54f42..271fcfa 100644 --- a/flatisfy/web/js_src/api/index.js +++ b/flatisfy/web/js_src/api/index.js @@ -4,7 +4,7 @@ require('es6-promise').polyfill() require('isomorphic-fetch') export const getFlats = function (callback) { - fetch('/api/v1/flats') + fetch('/api/v1/flats', { credentials: 'same-origin' }) .then(function (response) { return response.json() }).then(function (json) { @@ -22,7 +22,10 @@ export const getFlats = function (callback) { } export const getFlat = function (flatId, callback) { - fetch('/api/v1/flat/' + encodeURIComponent(flatId)) + fetch( + '/api/v1/flat/' + encodeURIComponent(flatId), + { credentials: 'same-origin' } + ) .then(function (response) { return response.json() }).then(function (json) { @@ -40,6 +43,7 @@ export const updateFlatStatus = function (flatId, newStatus, callback) { fetch( '/api/v1/flat/' + encodeURIComponent(flatId) + '/status', { + credentials: 'same-origin', method: 'POST', headers: { 'Content-Type': 'application/json' @@ -52,7 +56,7 @@ export const updateFlatStatus = function (flatId, newStatus, callback) { } export const getTimeToPlaces = function (callback) { - fetch('/api/v1/time_to/places') + fetch('/api/v1/time_to/places', { credentials: 'same-origin' }) .then(function (response) { return response.json() }).then(function (json) { diff --git a/flatisfy/web/js_src/components/flatsmap.vue b/flatisfy/web/js_src/components/flatsmap.vue index d8d9465..1a844a7 100644 --- a/flatisfy/web/js_src/components/flatsmap.vue +++ b/flatisfy/web/js_src/components/flatsmap.vue @@ -37,7 +37,7 @@ export default { maxZoom: 17 }, tiles: { - url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png', + url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', attribution: '© OpenStreetMap contributors' }, icons: { diff --git a/flatisfy/web/js_src/components/flatstable.vue b/flatisfy/web/js_src/components/flatstable.vue index a5078af..242f383 100644 --- a/flatisfy/web/js_src/components/flatstable.vue +++ b/flatisfy/web/js_src/components/flatstable.vue @@ -76,9 +76,9 @@