vechain / connex

The mono-repo contains libraries to help build dApps for VeChain.
https://docs.vechain.org/developer-resources/sdks-and-providers/connex
GNU Lesser General Public License v3.0
85 stars 3.6k forks source link

feat/simplenet-cookies #151

Closed claytonneal closed 1 year ago

claytonneal commented 1 year ago

Problem

When connex is communicating through a load balancer that is using Cookies, Connex SimpleNet when running on node.js does not store Set-Cookie headers or use them as Cookie headers for subsequent requests

Changes

Added class SimpleNetNode that stores cookies and will add them in subsequent http requests

Advice could be given if to extend SimpleNet for this

libotony commented 1 year ago

Hello @claytonneal, thank you for your contribution. Personally, I believe this may not be a widely common requirement. I would recommend creating a separate package as the current structure allows developers to create their own Net packages and incorporate new features. I’m more than willing to include new packages in the awesome net section.

In terms of sticky-session, I’d advise considering a client-IP-based solution. If you choose to implement a cookie-based solution, please also accommodate the WebSockets and specify the designated cookie name.

claytonneal commented 1 year ago

heya, lets close this PR as yes team will create their own Net class!