Add cors headers. Updated fetch.
This commit is contained in:
@@ -14,7 +14,10 @@ const {
|
||||
function post(url, params) {
|
||||
return fetch(url, {
|
||||
method: 'post',
|
||||
mode: 'no-cors',
|
||||
cache: 'no-cache',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user