UPDATE: ignore patterns
All checks were successful
Build and Release / release (push) Successful in 1m33s
All checks were successful
Build and Release / release (push) Successful in 1m33s
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,3 +5,5 @@ pg_data
|
|||||||
*.env
|
*.env
|
||||||
*.env.dev
|
*.env.dev
|
||||||
build
|
build
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
@@ -73,9 +73,11 @@ func (s *FiberServer) SetupServer(
|
|||||||
"http://localhost:3001",
|
"http://localhost:3001",
|
||||||
"https://history-admin.kain.id.vn",
|
"https://history-admin.kain.id.vn",
|
||||||
"https://history-user.kain.id.vn",
|
"https://history-user.kain.id.vn",
|
||||||
|
"https://www.history-admin.kain.id.vn",
|
||||||
|
"https://www.history-user.kain.id.vn",
|
||||||
},
|
},
|
||||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"},
|
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH", "HEAD"},
|
||||||
AllowHeaders: []string{"Accept", "Authorization", "Content-Type", "Origin"},
|
AllowHeaders: []string{"Accept", "Authorization", "Content-Type", "Origin", "Range", "Cache-Control", "Pragma", "If-Modified-Since", "If-None-Match"},
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -452,6 +452,8 @@ func (h *AuthController) GoogleCallback(c fiber.Ctx) error {
|
|||||||
"http://localhost:3001": true,
|
"http://localhost:3001": true,
|
||||||
"https://history-admin.kain.id.vn": true,
|
"https://history-admin.kain.id.vn": true,
|
||||||
"https://history-user.kain.id.vn": true,
|
"https://history-user.kain.id.vn": true,
|
||||||
|
"https://www.history-admin.kain.id.vn": true,
|
||||||
|
"https://www.history-user.kain.id.vn": true,
|
||||||
}
|
}
|
||||||
feUrl := config.GetConfigWithDefault("FRONTEND_URL", "http://localhost:3000")
|
feUrl := config.GetConfigWithDefault("FRONTEND_URL", "http://localhost:3000")
|
||||||
redirectURL := data.RedirectURL
|
redirectURL := data.RedirectURL
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ func (ctrl *goongController) Proxy(c fiber.Ctx) error {
|
|||||||
c.Set(k, v)
|
c.Set(k, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.Set("Vary", "Origin")
|
||||||
|
|
||||||
if c.Method() == "GET" {
|
if c.Method() == "GET" {
|
||||||
if statusCode == fiber.StatusOK || statusCode == fiber.StatusNotModified {
|
if statusCode == fiber.StatusOK || statusCode == fiber.StatusNotModified {
|
||||||
c.Set("Cache-Control", "public, max-age=86400")
|
c.Set("Cache-Control", "public, max-age=86400")
|
||||||
|
|||||||
Reference in New Issue
Block a user