From b578dbafd58df8da5f96471cfea47439508e95f4 Mon Sep 17 00:00:00 2001 From: erikklavora <46493001+erikklavora@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:17:41 +0200 Subject: [PATCH 1/2] Add files via upload Aded proxy file to get rid of CORS problems --- proxy.php | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 proxy.php diff --git a/proxy.php b/proxy.php new file mode 100644 index 0000000..039df73 --- /dev/null +++ b/proxy.php @@ -0,0 +1,62 @@ + 'Proxy error: ' . curl_error($ch)]); + curl_close($ch); + exit(); +} + +curl_close($ch); + +// Set the HTTP response code +http_response_code($httpCode); + +// Return the response +echo $response; +?> From fec3fe243275fb92b55a6ebaf6c32e3cbe28b9dc Mon Sep 17 00:00:00 2001 From: erikklavora <46493001+erikklavora@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:19:37 +0200 Subject: [PATCH 2/2] Update map.js changed apiUrl to the newly created proxy.php file to get rid of CORS problems. --- src/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map.js b/src/map.js index 3b5ad71..206d2bf 100644 --- a/src/map.js +++ b/src/map.js @@ -1,6 +1,6 @@ import { createApp, reactive, ref, computed, watch, onMounted, toRaw } from '../lib/vue.esm-browser.js'; import * as ntools from './node-utils.js'; -const apiUrl = 'https://map.meshcore.dev/api/v1/nodes'; +const apiUrl = './proxy.php'; const types = { '1': 'Client',