Cookies filter
Context
When using cookie-based authentication, we send the value of the Cookie header in every RPC request. Cookies could contain a lot of data (especially, when using trackers, etc.), but the application usually needs a few of them. The proposal is to make it possible to select only specific cookies and reduce the RPC payload size.
Proposal
Add --proxy-cookies option, which accepts the comma-separated list of keys to send to the RPC server:
anycable-go --headers=cookies --proxy-cookies=app_session_id,user_id
Given the original cookie value "app_session_id=xqs;_ga=bla;_another_tracker=1231231;user_id=42;", at the RPC server side, we should have request.env.headers["cookie"] == "app_session_Id=xqs;user_id=42;".
hey @palkan can I help with this one?
Hey @rafaelrubbioli!
Sure, you're welcome! Feel free to ask any questions here.
hey @palkan I opened a PR for this! https://github.com/anycable/anycable-go/pull/157