|
@@ -31,6 +31,12 @@ func TestCorsHandlerWithOrigins(t *testing.T) {
|
|
reqOrigin: "http://local",
|
|
reqOrigin: "http://local",
|
|
expect: "http://local",
|
|
expect: "http://local",
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ name: "allow sub origins",
|
|
|
|
+ origins: []string{"local", "remote"},
|
|
|
|
+ reqOrigin: "sub.local",
|
|
|
|
+ expect: "sub.local",
|
|
|
|
+ },
|
|
{
|
|
{
|
|
name: "allow all origins",
|
|
name: "allow all origins",
|
|
reqOrigin: "http://local",
|
|
reqOrigin: "http://local",
|