feat: implement CORS support and update API_URL in environment configuration
This commit is contained in:
@@ -154,7 +154,7 @@ const HAS_DESC = { weather: true, data: false, logs: true };
|
||||
// ========== API helpers ==========
|
||||
|
||||
async function api(method, path, body) {
|
||||
const opts = { method, headers: {} };
|
||||
const opts = { method, headers: {}, credentials: 'include' };
|
||||
if (body) {
|
||||
opts.headers['Content-Type'] = 'application/json';
|
||||
opts.body = JSON.stringify(body);
|
||||
|
||||
Reference in New Issue
Block a user