From a6fa1e2b6dbbc08b37a2cedec4f756be164ab422 Mon Sep 17 00:00:00 2001 From: Mehara Rothila Ranawaka Date: Fri, 7 Nov 2025 00:40:52 +0530 Subject: [PATCH 1/3] Update gateway configuration --- config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config.yaml b/config.yaml index fe442b5..4c841d8 100644 --- a/config.yaml +++ b/config.yaml @@ -45,6 +45,13 @@ services: auth_required: true # env_var not specified - will auto-generate: APPOINTMENTS_SERVICE_URL + # Service Types (also handled by Appointment Service) + - name: "service-types" + path_prefix: "/api/v1/service-types" + target_url: "http://localhost:8083" + strip_prefix: "/api/v1" + auth_required: true + # --- Service & Project Management Service (Port 8084) --- - name: "services" path_prefix: "/api/v1/services" From cd35a7587a0a574bd27b41a15020cbc042b494af Mon Sep 17 00:00:00 2001 From: RandithaK Date: Tue, 11 Nov 2025 00:18:02 +0530 Subject: [PATCH 2/3] fix: Update CORS configuration to allow requests from 127.0.0.1 --- cmd/gateway/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/gateway/main.go b/cmd/gateway/main.go index 704bcc1..769a263 100644 --- a/cmd/gateway/main.go +++ b/cmd/gateway/main.go @@ -203,8 +203,13 @@ func main() { router.Use(middleware.Logger) router.Use(middleware.Recoverer) + // CORS Configuration - Allow frontend origins + // In production, replace with actual frontend domain(s) via environment variable router.Use(cors.New(cors.Options{ - AllowedOrigins: []string{"http://localhost:3000"}, + AllowedOrigins: []string{ + "http://localhost:3000", + "http://127.0.0.1:3000", + }, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"}, AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"}, ExposedHeaders: []string{"Link"}, From db7119b90b94eb94f42ba0dd68d5c79efcc1ee50 Mon Sep 17 00:00:00 2001 From: RandithaK Date: Wed, 12 Nov 2025 00:31:47 +0530 Subject: [PATCH 3/3] fix: Restrict pull request triggers to specific branches in buildtest.yaml --- .github/workflows/buildtest.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildtest.yaml b/.github/workflows/buildtest.yaml index ef2bc01..8fd5399 100644 --- a/.github/workflows/buildtest.yaml +++ b/.github/workflows/buildtest.yaml @@ -1,12 +1,11 @@ name: Build and Test API Gateway on: - push: - branches: - - '**' pull_request: branches: - - '**' + - main + - dev + - devOps jobs: build-test: