Sending cookies from Weweb -> Xano

I am trying to send a cookies from weweb to Xano, but I cannot see them, I have it working using Postman but not weweb. I am using the default CORS for Xano

Allow Credentials: True
Allow Methods:*
Allow Origins:*
Allow Headers:*
Max Age: 1 hour

The cookie I want to send to Xano, is under builder.vunked in dev tools

Cookie information

vunkedCookie=value; Domain=vunked ; Path=/; SameSite=Lax Expires=Thu, 20 Feb 2025 20:34:38 GMT;

Postman

When calling the API through postman i can access the cookies in the header

I can use postman to include cookies and view the cookie in xano but cant seem to do from weweb?

Weweb

when weweb calls the API, there are no cookies present

Domains

the xano domain is subdomain xano.vunked
weweb domain is subdomain is builder.vunked

Can anyone help?

I think this line prevent Xano to receive cookies as browser are blocking sending them to server allowing *, its a security constraint. You have to set a specific allowed domain (our editor and your published app domain)

Also you will not be able to send cookies along your xano requests made with our plugin yet. Because it require a hidden feature (toggle send credentials) we disabled because Xano didn’t have a way to configure CORS until recently and so it was not possible anyway (once toggled every request failed because of browser policies, because as I said, to join cookies you need to allow a specific origin and not wildcard)

First you can try to set a specific origin and make the request with our REST API plugin, by toggeleing “send credentials” on the rest api action, and see if you receive the cookies.

1 Like

Hi Alexis, thanks so much.

The REST API did the trick for my published app! I can now send cookies to my bank end.

It still doesn’t work when trying to hit the API in the builder. I get the following error:

stack: "Error: Network Error at e.exports (ttps://editor-cdn.weweb.io/public/js/chunk-vendors.792b3bba.js:1:120680) at _.onerror (ttps://editor-cdn.weweb.io/public/js/chunk-vendors.792b3bba.js:1:115642) at XMLHttpRequest.sentryWrapped (ttps://browser.sentry-cdn.com/7.45.0/bundle.min.js:2:38971)

In Xano CORS management, I have added “https://.weweb.io/” as an origin, not sure if it needs to be something else to get working in the builder?

I think it need to be https://editor.weweb.io :thinking: