Skip to content

Bug: When using AppProxy in Azure, headers are not passed #499

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bjornrobertsson opened this issue May 6, 2025 · 8 comments
Open

Bug: When using AppProxy in Azure, headers are not passed #499

bjornrobertsson opened this issue May 6, 2025 · 8 comments

Comments

@bjornrobertsson
Copy link

Similar to : #76 but different source.

This is for an Issue a customer raised in Coder directly: coder/coder#17687, after debugging this affects the VS Code extension and using coder cli has different behaviour.

It seems that the Coder Extension misses to pass the --header-command to the CLI while coder cli on it's own will work.

Issue:
I can not start a stopped workspace from a local VSCode instance when Coder is behind a Azure AppProxy (using --header)

Expected behaviour:
Workspace should start

Actual behaviour:
Failed to open workspace

"--global config
...
coder-config-xyz exited with code 1: Encountered an error running "coder start", see "coder start --help" for more information
error: invalid character '<' looking for beginning of value"

Steps to Reproduce
Wait until a workspace is stopped in local VSCode
Reload Window while network was down (has nothing to do with the issue)
When VSCode asks to start the stopped workspace say yes

Coder: 2.20.2
OS: Linux

@MrPeacockNLB
Copy link

@code-asher the header command is configured properly.

@matifali matifali marked this as a duplicate of coder/coder#17687 May 7, 2025
@matifali
Copy link
Member

matifali commented May 7, 2025

HI @MrPeacockNLB
Have you correctly configured this in VSCode settings too? vscode://settings/coder.headerCommand

Image

@matifali matifali added must-do regression Something that used to work and is now broken and removed must-do regression Something that used to work and is now broken labels May 7, 2025
@MrPeacockNLB
Copy link

MrPeacockNLB commented May 7, 2025

yes of course sir!

Otherwise I would not be able to get the information that the workspace has status "stop". If we do not configure the header command then we have no access to the coder API.

Image

@MrPeacockNLB
Copy link

All other functions from the extension seems to work properly.

@matifali
Copy link
Member

matifali commented May 7, 2025

@MrPeacockNLB, is this a regression that used to work before? Or you recently discovered this while starting to use an APPProxy that requires the headers.

@code-asher
Copy link
Member

code-asher commented May 7, 2025

I think this is probably a regression. We used to make API calls to start the workspace and we switched to using the CLI to start workspaces instead.

For API calls we have a single place where we attach headers (and anything else we need), but this CLI execution was copied from another invocation and it seems parts were missed (including the header command). We should probably have one place where we generate the invocation so everything necessary is attached no matter where or when we exec the CLI.

@MrPeacockNLB
Copy link

I'm not sure if it is regression. I'm not sure if I have had tested this ever before.

@f0ssel
Copy link
Contributor

f0ssel commented May 8, 2025

Related to #500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants