Configuring cookies for use within the Makeswift Visual Builder
iframe
, so any cookies your site
attempts to set are considered as third-party
cookies.
In order for your site to be able to set cookies that are compatible with the
Makeswift Visual Builder, you may need to include certain attributes.
SameSite=None;
and Secure;
attributes
on your cookie.
For example, let’s say your site attempts to set a cookie client-side using
document.cookie
:
SameSite=None;
and Secure;
:
Set-Cookie
header. For example, you may be using the cookies()
API from
Next.js:
Set-Cookie
header string on your response header, you
can follow the same conventions as the client-side cookie string.
app.makeswift.com
. This means that any cookies set by
your site within the builder are scoped to the builder!
To achieve this functionality, simply add a Partitioned;
attribute whenever
you set your cookies. Using our client-side example from above:
cookies()
example:
next-intl
package will attempt to set
cookies for detected locales. For such cases, we recommend checking the docs of
these tools to see if they allow for cookie attribute configuration. Continuing
the next-intl
example, we see that their APIs offer
customization of their locale
detection cookie.
If the third-party package you’re using does not permit modifying cookie
attributes, you may still be able to patch them retroactively using the Next.js
cookies()
API (if the cookies are set server-side), or by manually writing
cookies with the appropriate attributes client-side. Whenever you make changes
to how external packages set cookies, make sure to test that the cookie
attribute changes don’t impact the security or functionality of your cookies on
your live site.