This commit is contained in:
@@ -57,21 +57,19 @@ func NewHttpServer() *FiberServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *FiberServer) SetupServer(
|
func (s *FiberServer) SetupServer(
|
||||||
sqlPg sqlc.DBTX,
|
sqlPg sqlc.DBTX,
|
||||||
sqlTile *sql.DB,
|
sqlTile *sql.DB,
|
||||||
sqlRasterTile *sql.DB,
|
sqlRasterTile *sql.DB,
|
||||||
redis cache.Cache,
|
redis cache.Cache,
|
||||||
sclient storage.Storage,
|
sclient storage.Storage,
|
||||||
oauth *oauth2.Config,
|
oauth *oauth2.Config,
|
||||||
) {
|
) {
|
||||||
// Apply CORS middleware
|
// Apply CORS middleware
|
||||||
s.App.Use(cors.New(cors.Config{
|
s.App.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{
|
AllowOrigins: []string{
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"https://localhost:3000",
|
|
||||||
"http://localhost:3001",
|
"http://localhost:3001",
|
||||||
"https://localhost:3001",
|
"https://history-admin.kain.id.vn",
|
||||||
"http://localhost:3344",
|
|
||||||
},
|
},
|
||||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"},
|
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"},
|
||||||
AllowHeaders: []string{"Accept", "Authorization", "Content-Type", "Origin"},
|
AllowHeaders: []string{"Accept", "Authorization", "Content-Type", "Origin"},
|
||||||
|
|||||||
Reference in New Issue
Block a user