Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cmd/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,14 @@ 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", "https://techtorque.vercel.app"},
AllowedOrigins: []string{
"http://localhost:3000",
"http://127.0.0.1:3000",
"https://techtorque.vercel.app",
},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
ExposedHeaders: []string{"Link"},
Expand Down
7 changes: 7 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading