diff --git a/apps/db-adapter/main.go b/apps/db-adapter/main.go index 423ff72..41fdfe1 100644 --- a/apps/db-adapter/main.go +++ b/apps/db-adapter/main.go @@ -23,7 +23,7 @@ import ( ) const ( - defaultHTTPPort = ":80" + defaultHTTPPort = ":5237" defaultMemgraphURI = "bolt://memgraph:7687" defaultMemgraphUser = "memgraph" defaultMemgraphPass = "memgraph" @@ -83,8 +83,15 @@ func main() { router.Use(cors.New(cors.Config{ AllowOrigins: []string{fmt.Sprintf("http://localhost%s", httpPort), "http://localhost"}, AllowCredentials: true, - AllowHeaders: []string{"X-User-ID", "X-User-Name", "Content-Type"}, - MaxAge: 12 * time.Hour, + AllowHeaders: []string{ + "X-User-ID", + "X-User-Name", + "Content-Type", + "cf-access-token", + "CF-Access-Client-Secret", + "CF-Access-Client-Id", + }, + MaxAge: 12 * time.Hour, })) router.Use(ginzap.Ginzap(logger, time.RFC3339, true)) diff --git a/compose.yaml b/compose.yaml index d4a76b8..23a9430 100644 --- a/compose.yaml +++ b/compose.yaml @@ -41,16 +41,16 @@ services: image: vcscsvcscs/gheritage-db-adapter:latest container_name: db-adapter ports: - - "8080:8080" + - "5237:5237" depends_on: - memgraph environment: - - HTTP_PORT=:8080 + - HTTP_PORT=:5237 - MEMGRAPH_URI=bolt://memgraph:7687 - MEMGRAPH_USER= - MEMGRAPH_PASSWORD= healthcheck: - test: ["CMD-SHELL", "curl --fail http://localhost:8080/health || exit 1"] + test: ["CMD-SHELL", "curl --fail http://localhost:5237/health || exit 1"] interval: 10s timeout: 5s retries: 3 diff --git a/docker-compose.local-testing.yaml b/docker-compose.local-testing.yaml index cbcfd6f..d2505f9 100644 --- a/docker-compose.local-testing.yaml +++ b/docker-compose.local-testing.yaml @@ -21,11 +21,11 @@ services: dockerfile: ./integration-test.dockerfile container_name: db-adapter ports: - - "8080:8080" + - "5237:5237" depends_on: - memgrapht environment: - - HTTP_PORT=:8080 + - HTTP_PORT=:5237 - MEMGRAPH_URI=bolt://memgrapht:7687 - MEMGRAPH_USER=memgraph - MEMGRAPH_PASSWORD=memgraph