How to enable samesite cookie

How to enable samesite cookie to lax or none or secure in jenkins
we have tried below option but its not working

JAVA_ARGS=“-Djava.awt.headless=true -Xmx18384m -Dhudson.util.CookieAntiForgeryProtectionMiddleware.sameSite=strict”