- Notifications
You must be signed in to change notification settings - Fork34
Pass the header command output to WebSocket creation#619
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
base:main
Are you sure you want to change the base?
Conversation
...headers, | ||
...(token ?{[coderSessionTokenHeader]:token} :{}), | ||
...configs.options?.headers, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Does this order make sense? (From lowest to highest)
- Header args
- Token taken from the axios instance
- Explicitly passed headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
After re-reading the original issue:
We are behind an Azure App Proxy, WAF and a firewall. This means we are using --header-command to inject the needed token.
Would this mean we want the headers to have a higher priority over the token from the axios instance 🤔 ?
From highest to lowest:
- Explicit headers
- Header args (from the command)
- Implicitly derived headers like token from the axios instance
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice cleanup too.
Uh oh!
There was an error while loading.Please reload this page.
...headers, | ||
...(token ?{[coderSessionTokenHeader]:token} :{}), | ||
...configs.options?.headers, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this makes sense.
Uh oh!
There was an error while loading.Please reload this page.
Closes#618