CORS support (#73)
This adds per-listener CORS support. Logic is ported from Vault, along with a fully new test suite.
This commit is contained in:
1 parent
66978d637a
commit
fafdcbbfa4
9 files changed
+423
-37
No files matched your search
@@ -91,11 +91,15 @@ func WithDefaultOrgId(id string) Option {
|
||||
|
||||
// NewTestController blocks until a new TestController is created, returns the url for the TestController and a function
|
||||
// that can be called to tear down the controller after it has been used for testing.
|
||||
func NewTestController(t *testing.T, opt ...Option) (string, func()) {
|
||||
func NewTestController(t *testing.T, opt ...Option) *TestController {
|
||||
conf, err := getOpts(opt...)
|
||||
if err != nil {
|
||||
t.Fatalf("Couldn't create TestController: %v", err)
|
||||
}
|
||||
tc := controller.NewTestController(t, conf)
|
||||
return tc.ApiAddress(), tc.Shutdown
|
||||
return &TestController{TestController: tc}
|
||||
}
|
||||
|
||||
type TestController struct {
|
||||
*controller.TestController
|
||||
}
|
||||
Reference in new issue
Block a user