Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Commit 81f690e

Browse files
authored
Merge pull request #11 from TechTorque-2025/randitha-superbranch
Randitha superbranch
2 parents 9fcee1b + 94952d7 commit 81f690e

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

cmd/gateway/main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,14 @@ func main() {
203203
router.Use(middleware.Logger)
204204
router.Use(middleware.Recoverer)
205205

206+
// CORS Configuration - Allow frontend origins
207+
// In production, replace with actual frontend domain(s) via environment variable
206208
router.Use(cors.New(cors.Options{
207-
AllowedOrigins: []string{"http://localhost:3000", "https://techtorque.vercel.app"},
209+
AllowedOrigins: []string{
210+
"http://localhost:3000",
211+
"http://127.0.0.1:3000",
212+
"https://techtorque.vercel.app",
213+
},
208214
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"},
209215
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
210216
ExposedHeaders: []string{"Link"},

config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ services:
4545
auth_required: true
4646
# env_var not specified - will auto-generate: APPOINTMENTS_SERVICE_URL
4747

48+
# Service Types (also handled by Appointment Service)
49+
- name: "service-types"
50+
path_prefix: "/api/v1/service-types"
51+
target_url: "http://localhost:8083"
52+
strip_prefix: "/api/v1"
53+
auth_required: true
54+
4855
# --- Service & Project Management Service (Port 8084) ---
4956
- name: "services"
5057
path_prefix: "/api/v1/services"

0 commit comments

Comments
 (0)