mirror of
https://github.com/labstack/echo.git
synced 2025-06-15 00:14:57 +02:00
@ -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,
|
||||||
|
Reference in New Issue
Block a user