anycable-go icon indicating copy to clipboard operation
anycable-go copied to clipboard

feat(cli): proxy-cookies flag to filter cookies

Open rafaelrubbioli opened this issue 3 years ago • 2 comments

fixes https://github.com/anycable/anycable-go/issues/156

What is the purpose of this pull request?

Add a way to filter the cookies that are sent, to simplify and remove unneeded cookies

What changes did you make? (overview)

I added a flag --proxy-cookies that, if set, will filter the cookies that are sent to the server

Is there anything you'd like reviewers to focus on?

Please check if I did everything that was needed. I'd be happy to fix any problems and hear any suggestions 😄

Checklist

  • [x] I've added tests for this change
  • [ ] I've added a Changelog entry
  • [x] I've updated documentation

Q: do i need to add a changelog entry?

rafaelrubbioli avatar Oct 10 '22 21:10 rafaelrubbioli

@palkan Sure, will work on it!

rafaelrubbioli avatar Oct 13 '22 11:10 rafaelrubbioli

@palkan Thanks for the tip! That was a great suggestion! :rocket:

rafaelrubbioli avatar Oct 13 '22 11:10 rafaelrubbioli

@palkan If everything is fine can you add the hacktoberfest-accepted label? Thanks!

rafaelrubbioli avatar Oct 18 '22 12:10 rafaelrubbioli

Thanks!

Let's fix the linting errors and we're good to merge it.

palkan avatar Oct 18 '22 15:10 palkan

I'll try to fix all errors, but there was an error on test-conformance, and I'm not really sure where to fix it 🤔

rafaelrubbioli avatar Oct 18 '22 15:10 rafaelrubbioli

there was an error on test-conformance, and I'm not really sure where to fix it

This is an integration test defined here: https://github.com/anycable/anyt/blob/ee8c622ff1b3c0431435a65e1047632c078208ba/lib/anyt/tests/request/connection_test.rb#L32

From the logs, we seen that no cookies are proxied (though we do not set proxy-cookies); looks like a bug.

UPD: See https://go.dev/play/p/zToXcc6dBvP

palkan avatar Oct 18 '22 15:10 palkan

there was an error on test-conformance, and I'm not really sure where to fix it

This is an integration test defined here: https://github.com/anycable/anyt/blob/ee8c622ff1b3c0431435a65e1047632c078208ba/lib/anyt/tests/request/connection_test.rb#L32

From the logs, we seen that no cookies are proxied (though we do not set proxy-cookies); looks like a bug.

UPD: See go.dev/play/p/zToXcc6dBvP

Good catch! Thats why we always have tests 😅 I think it's fixed now

rafaelrubbioli avatar Oct 18 '22 15:10 rafaelrubbioli

Perfect! Thanks!

palkan avatar Oct 18 '22 20:10 palkan