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

pass headers to coder api#81

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

Closed
Liorba wants to merge10 commits intocoder:mainfromLiorba:main
Closed

pass headers to coder api#81

Liorba wants to merge10 commits intocoder:mainfromLiorba:main

Conversation

@Liorba
Copy link

@LiorbaLiorba commentedApr 17, 2023
edited
Loading

Hey coder team this pr tries to tackle issue#76
This pr added the following functionality to the vscode extension:

  1. new set of configuration to set a VPN header
  2. option to set the token directly insettings.json or in file
  3. if header name is set and non of the option above was not provided a user will be presented by prompt widow to add his token (similar to session token)
  4. if a valid header it will be added toAxios global headers.
  5. To deal with a case that the provided token expired of invalid after some time, I've added new Axios interceptor. which will check a set of conditions and prompt the user to put new case it discover a bad response due to invalid token
  6. pass the vpn header name and token to the SSH configproxyCommand

There is an issue with the codervpnssh command that unlike thessh command do not pass the headers correctly to the underline ssh command. when I replace it with the "regular" ssh command it worked. any Idea what might causing this?

@kylecarbs
Copy link
Member

@Liorba I fixed the header problem in the attached PR:coder/coder#7181

I'll review the rest shortly!

Liorba reacted with rocket emoji

Copy link
Member

@deansheatherdeansheather left a comment

Choose a reason for hiding this comment

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

This should probably just be a map of header name to string or file path so people can set multiple headers

Liorbaand others added2 commitsApril 18, 2023 09:48
Co-authored-by: Dean Sheather <dean@deansheather.com>
Co-authored-by: Dean Sheather <dean@deansheather.com>
@Liorba
Copy link
Author

@deansheather,I thought about this approach at first, but this is no regular header. it sort of like the session token which is a header but has a special treatments.

@kylecarbs
Copy link
Member

@Liorba is it alright if I work off of your code and change some things? I want to make it more generic so that it's not so VPN-specific (even though that will be the first-class use-case).

@Liorba
Copy link
Author

Liorba commentedApr 18, 2023
edited
Loading

@kylecarbs sure mate!
what change did you have in mind? I can probably work on that as well if you like.
TBH, the reason I didn't went on the generic approach at the first place is that the VPN header are completely different beast than any other header because :

  • it can be expired, and we need to catch that
  • it need to to be stored between sessions
  • we need to pass it to the ssh command.
    Due to that it seems like more related to the session-token implementation in the extension (which itselfbeing pass as a header)
    LMK how can I help in any direction you may choose.

@rodrimaiarodrimaia self-assigned thisJun 12, 2023
@kylecarbs
Copy link
Member

@rodrimaia let's make this more generic withcoder.headers instead to allow for a series of arbitrary headers!

@bpmct
Copy link
Member

We did this in#119!

@bpmctbpmct closed thisAug 18, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@deansheatherdeansheatherdeansheather left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Liorba@kylecarbs@bpmct@deansheather@rodrimaia@liorb-canva

[8]ページ先頭

©2009-2025 Movatter.jp