Hi, You'll notice that most of the code uses function chaining on a single line, but the cookie code puts method calls on a single line in the same style as the cookie examples on the website. I would also think a more commonly used JS implementation would use a simple for loop or RegEx matching to find cookies.
You'll also note this comment in the code: // The lax value will send the cookie for all same-site // requests and top-level navigation GET requests. This // is sufficient for user tracking, but it will prevent // many CSRF attacks. This is the default value in modern browsers. Matches word for word the documentation: "The lax value will send the cookie for all same-site requests and top-level navigation GET requests. This is sufficient for user tracking, but it will prevent many Cross-Site Request Forgery (CSRF) attacks. This is the default value in modern browsers.” Modifications to 3rd party code generally stay under the same license; you don't have to copy and paste code, just looking at something and reproducing it could be considered copying. Kind Regards, Justin --------------------------------------------------------------------- To unsubscribe, e-mail: general-unsubscr...@incubator.apache.org For additional commands, e-mail: general-h...@incubator.apache.org