Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hack: support the "Partitioned" flag on VCAP_ID cookies #396

Merged

Commits on Feb 20, 2024

  1. feat: hack: support the "Partitioned" flag on VCAP_ID cookies

    The `Partitioned` flag is used for cookies that are set on web sites
    embedded via iframes. The cookie is then available only in combination
    of the host site and the embedded site.
    
    Golang's `http.Cookie` type does not yet support the `Partitioned`
    flag, but Google Chrome is already testing mandatory support and
    rejecting/omitting cookies without it for 1% of users via A/B roll-out.
    
    The implementation wraps the `http.Cookie` and extends it with the
    `Partitioned` field. This field is then used to forward the raw
    cookie string when creating the derived VCAP_ID cookies for sticky
    sessions.
    
    Once the Golang standard library supports the `Partitioned` flag, this
    wrapper can just be removed.
    
    A test that checks the `Unparsed` section of the `http.Cookie` will
    ensure that the tests will fail once the `Partitioned` flag is
    supported by the Golang standard library.
    peanball committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    9b8f90e View commit details
    Browse the repository at this point in the history