Skip to content
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

improvement(framework): allow users to specify proxy hostname in project config #3690

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

eysi09
Copy link
Collaborator

@eysi09 eysi09 commented Feb 6, 2023

What this PR does / why we need it:

After upgrading to Node 18, some users reported issues with port forwarding to "localhost" when using Node's createProxyMiddleware package.

This appears to be mostly the expected behaviour in Node 17+ and previously the only workaround was to set the proxy URL via the GARDEN_DEFAULT_PROXY_ADDRESS env var.

This PR adds a proxy field to the project config so that user can explicitly set the proxy address for the project without having to ask everyone to update their environment variables:

kind: Project
name: <my-project>
proxy:
  hostname: 127.0.0.1

Which issue(s) this PR fixes:

Fixes #3667

Special notes for your reviewer:

@eysi09 eysi09 requested a review from edvald February 6, 2023 23:06
@eysi09 eysi09 merged commit dd50be4 into main Feb 7, 2023
@eysi09 eysi09 deleted the add-proxy-config branch February 7, 2023 02:10
@@ -319,6 +324,19 @@ export const projectDocsSchema = () =>
`
)
.example([".gardenignore", ".gitignore"]),
proxy: joi.object().keys({
hostname: joi
Copy link
Member

Choose a reason for hiding this comment

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

I think this could easily be confused with a proxy setting for garden itself; port-forwards: listen-address would be less confusing to me

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

Successfully merging this pull request may close these issues.

Error occurred while trying to proxy request on Garden v0.12.50.
3 participants