diff --git a/api-gateway/api.conf b/api-gateway/api.conf index 82d3eba1a6..1835f218eb 100644 --- a/api-gateway/api.conf +++ b/api-gateway/api.conf @@ -14,11 +14,14 @@ server { add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization, Cookie' always; - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 200; + location / { + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 200; + } + return 404 '{"status": 400, "message": "Bad request"}'; } location /health { @@ -101,9 +104,6 @@ server { } - location / { - return 404 '{'status': 400, 'message': 'Bad request'}'; - } proxy_intercept_errors on; default_type application/json; diff --git a/server/docker-compose.yml b/server/docker-compose.yml index bdc6e9ed1e..7a85f21ee8 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -8,7 +8,7 @@ services: ports: - "80:80" - user: + user-service: build: context: ./user-service dockerfile: Dockerfile @@ -24,7 +24,7 @@ services: - DB_LOCAL_URI=${DB_URI_USER} - JWT_SECRET - questions: + qn-service: build: context: ./question-service dockerfile: Dockerfile @@ -38,7 +38,7 @@ services: - ENV - DB_CLOUD_URI=${DB_URI_QUESTION} - collaboration: + collab-service: build: context: ./collaboration-service dockerfile: Dockerfile @@ -56,7 +56,7 @@ services: expose: - 6379 - matching: + match-service: build: context: ./matching-service dockerfile: Dockerfile @@ -71,7 +71,7 @@ services: - backend environment: - REDIS_URL=redis://matching-redis:6379 - ai: + ai-service: build: context: ./ai-service dockerfile: Dockerfile @@ -84,7 +84,7 @@ services: environment: - ENV - GEMINI_API_KEY=${GEMINI_API_KEY} - chat: + chat-service: build: context: ./chat-service dockerfile: Dockerfile