Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Support--header for CLI commands to support proxies#4008

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 1 commit intomainfromcliheader
Sep 12, 2022

Conversation

kylecarbs
Copy link
Member

Fixes#3527.

@kylecarbskylecarbs self-assigned thisSep 12, 2022
Copy link
Collaborator

@sreyasreya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Seems fine but wouldn't this make more sense being integrated in the sdk? You could just add a variadic options parameter tocodersdk.New and modify the transport on the HTTP client there.

@kylecarbs
Copy link
MemberAuthor

I didn't want to abstract the client just for this change, because it seems like a weird one.

@sreya
Copy link
Collaborator

Based on the issue though isn't the expectation that all commands accept an arbitrary list of headers?

@kylecarbs
Copy link
MemberAuthor

Yup, this is a global flag.

@sreya
Copy link
Collaborator

Like I said it's fine but it's just weird we're introducing a new way that every command needs to instantiate a client. It's technically a bug to callcodersdk.New directly now incli. Also if any third party wants to usecodersdk as a library they lose out on this functionality and have to write a similar wrapper.

Also unless I'm missing something this PR only implements arbitrary headers forlogin is there some reason we're not addressing the rest of the commands in this PR?

@kylecarbs
Copy link
MemberAuthor

Nah, this just tests it againstlogin but we could test it against arbitrary commands.

My argument for not exposing this functionality is that it's pretty weird and also trivial for someone else to implement if they want to do so.

@kylecarbskylecarbs merged commita209825 intomainSep 12, 2022
@kylecarbskylecarbs deleted the cliheader branchSeptember 12, 2022 21:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sreyasreyasreya approved these changes

Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support--header for CLI commands to support CloudFlare Access or other identify-aware proxies
2 participants
@kylecarbs@sreya

[8]ページ先頭

©2009-2025 Movatter.jp