Cors test
This commit is contained in:
@@ -69,10 +69,10 @@ func TestCORSMiddleware(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "Allowed origin",
|
name: "Allowed origin",
|
||||||
origin: config.Site.AllowOrigins,
|
origin: "http://localhost:8080",
|
||||||
expectedStatus: http.StatusOK,
|
expectedStatus: http.StatusOK,
|
||||||
expectedHeaders: map[string]string{
|
expectedHeaders: map[string]string{
|
||||||
"Access-Control-Allow-Origin": config.Site.AllowOrigins,
|
"Access-Control-Allow-Origin": "http://localhost:8080",
|
||||||
"Content-Type": "text/plain; charset=utf-8",
|
"Content-Type": "text/plain; charset=utf-8",
|
||||||
"Access-Control-Allow-Credentials": "true",
|
"Access-Control-Allow-Credentials": "true",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user