-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add insecure-bind-address
option for npm run start:prod
#3969
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3969 +/- ##
=======================================
Coverage 47.29% 47.29%
=======================================
Files 182 182
Lines 8404 8404
Branches 72 72
=======================================
Hits 3975 3975
Misses 4184 4184
Partials 245 245 Continue to review full report at Codecov.
|
.npmrc
Outdated
|
||
kubernetes-dashboard:kubeconfig_dir = ${HOME}/.kube | ||
kubernetes-dashboard:kubeconfig = ${HOME}/.kube/config | ||
kubernetes-dashboard:frontend_build_dir = dist/frontend/en | ||
kubernetes-dashboard:dashboard_binary_path = dist/amd64/dashboard | ||
kubernetes-dashboard:dashboard_locale_config = dist/amd64/locale_conf.json | ||
kubernetes-dashboard:insecure_bind_address = 0.0.0.0 |
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.
Use localhost as default bind address here. Binding to all interfaces by default is not secure.
package.json
Outdated
@@ -13,7 +13,7 @@ | |||
"start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=0.0.0.0", |
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.
Could you also change --host
parameter here and above to use this new variable?
package.json
Outdated
"start:https": "concurrently \"npm run start:backend:https\" \"npm run start:frontend:https\"", | ||
"start:frontend": "npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=0.0.0.0", | ||
"start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=0.0.0.0", | ||
"start:frontend": "echo $npm_package_config_bind_address && npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=$npm_package_config_bind_address", |
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.
Is this echo
a debug leftover?
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.
Yes, it's my mistake. Sorry. I'll remove it soon.
To run `npm run start:prod` and `start:frontend` in container for development and to check it from browser outside container, add option for `bind-address` into `.npmrc` and pass it `start:prod` and `start:frontend`.
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.
/lgtm
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floreks, shu-mutou The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
To run
npm run start:prod
in container for developmentand to check it from browser, add option for
insecure-bind-add
into
.npmrc
and pass itstart:prod
.