Skip to content

Commit

Permalink
Merge pull request #3530 from hashicorp/b-allow-cross-origin-connecti…
Browse files Browse the repository at this point in the history
…ons-in-ui

Allow cross origin connections in ui
  • Loading branch information
DingoEatingFuzz committed Nov 10, 2017
2 parents a8e6989 + 344d1df commit 6fcaab5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ dev: ## Build for the current development platform
@rm -f $(GOPATH)/bin/nomad
@$(MAKE) --no-print-directory \
$(DEV_TARGET) \
GO_TAGS=nomad_test $(NOMAD_UI_TAG)
GO_TAGS="nomad_test $(NOMAD_UI_TAG)"
@mkdir -p $(PROJECT_ROOT)/bin
@mkdir -p $(GOPATH)/bin
@cp $(PROJECT_ROOT)/$(DEV_TARGET) $(PROJECT_ROOT)/bin/
Expand Down
68 changes: 57 additions & 11 deletions command/agent/bindata_assetfs.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion command/agent/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (e *codedError) Code() int {
func handleUI(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
header := w.Header()
header.Add("Content-Security-Policy", "default-src 'none'; connect-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'none'; frame-ancestors 'none'")
header.Add("Content-Security-Policy", "default-src 'none'; connect-src *; img-src 'self' data:; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'none'; frame-ancestors 'none'")
h.ServeHTTP(w, req)
return
})
Expand Down

0 comments on commit 6fcaab5

Please sign in to comment.