Skip to content

Commit

Permalink
Merge #25052
Browse files Browse the repository at this point in the history
25052: build, ui: make webpack dev server use HTTPS, proxy auth endpoint r=vilterp a=vilterp

If WDS isn't running HTTPS and proxying to an HTTPS URL on Cockroach, Cockroach sometimes tries to redirect the client to use HTTPS, creating a redirect loop.

Also, make `make watch` proxy requests to `_auth`, since we're now using that for login work.

Release note: None

Co-authored-by: Pete Vilter <[email protected]>
  • Loading branch information
craig[bot] and Pete Vilter committed Apr 25, 2018
2 parents ffa6d48 + e3a7b4f commit c54d0b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1135,10 +1135,10 @@ $(UI_ROOT)/yarn.opt.installed:
touch $@

.PHONY: ui-watch
ui-watch: export TARGET ?= http://localhost:8080
ui-watch: export TARGET ?= https://localhost:8080
ui-watch: PORT := 3000
ui-watch: $(UI_DLLS) $(UI_ROOT)/yarn.opt.installed
cd $(UI_ROOT) && $(WEBPACK_DASHBOARD) -- $(WEBPACK_DEV_SERVER) --config webpack.ccl.js --port $(PORT)
cd $(UI_ROOT) && $(WEBPACK_DASHBOARD) -- $(WEBPACK_DEV_SERVER) --config webpack.ccl.js --port $(PORT) --https

.PHONY: ui-clean
ui-clean: ## Remove build artifacts.
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/webpack.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = (distDir, ...additionalRoots) => ({
devServer: {
contentBase: path.join(__dirname, distDir),
proxy: [{
context: ["/_admin", "/_status", "/ts"],
context: ["/_admin", "/_status", "/ts", "/_auth"],
secure: false,
target: process.env.TARGET,
}],
Expand Down

0 comments on commit c54d0b9

Please sign in to comment.