Skip to content

Commit

Permalink
Update to OPA v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tsandall committed Dec 20, 2016
1 parent aa801ba commit 611ce84
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,14 @@ func QueryDataAPI(opaURL string, doc string, r authorization.Request) (*http.Res
return nil, err
}

global := url.QueryEscape(string(bs))

// The policy declares an input named "request" that is intended to contain
// the Docker API request.
url := fmt.Sprintf("%s/data%s?global=request:%s", opaURL, doc, global)
// Set the request document to the Docker request content.
url := fmt.Sprintf("%s/data%s?request=:%s", opaURL, doc, url.QueryEscape(string(bs)))

return http.Get(url)
}

const (
version = "0.1.2"
version = "0.1.3"
)

func main() {
Expand Down

0 comments on commit 611ce84

Please sign in to comment.