Hi, I’m trying to create an http-function like this:
//...import etc...
export function post_logs(request) {
let options = {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Access-Control-Max-Age": "86400"
}
};
return request.body.json()
.then(body => {
//etc..
However when I test on Postman I’m getting: “error”:{“name”:“JsonSyntaxError”,“errorGroup”:“User”}}
I think it’s CORS issue since I don’t get it when I test it from another Wix site.
Any thoughts?