mirror of
https://github.com/labstack/echo.git
synced 2025-06-10 23:57:28 +02:00
Fixed cors test
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
8203e48696
commit
ec7b497940
@ -54,7 +54,7 @@ func TestCORS(t *testing.T) {
|
|||||||
c = e.NewContext(req, rec)
|
c = e.NewContext(req, rec)
|
||||||
req.Header.Set(echo.HeaderOrigin, "localhost")
|
req.Header.Set(echo.HeaderOrigin, "localhost")
|
||||||
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
|
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
|
||||||
cors := CORSWithConfig(CORSConfig{
|
cors = CORSWithConfig(CORSConfig{
|
||||||
AllowOrigins: []string{"*"},
|
AllowOrigins: []string{"*"},
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
MaxAge: 3600,
|
MaxAge: 3600,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user