I'm using Ant Media Server in one of my streaming project. I need to set SameSite=none
in Ant Media Server. Could you please tell how to do that?
You need to set the SameSite
attribute through context.xml
. By default, context.xml
file is under /usr/local/antmedia/webapps/{APP}/META-INF/context.xml
Add the following line to set the SameSite
to none
:
<CookieProcessor sameSiteCookies="none" className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"/>
Then your context.xml
file should something like this:
<Context>
<Resources allowLinking="true" cacheTtl="500" className="io.antmedia.webresource.StreamWebRoot"/>
<CookieProcessor sameSiteCookies="none" className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"/>
</Context>
Please pay attention that SameSite=none
is available on accessing the secure content. In other words, you need to use HTTPS.
For other SameSite
values, please visit to https://tomcat.apache.org/tomcat-8.5-doc/config/cookie-processor.html
To learn more about SameSite
attribute, visit the following link
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite