Skip to content
Open
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
3 changes: 1 addition & 2 deletions src/ApiGateway/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"Routes": {
"identity-route": {
"ClusterId": "identity-cluster",
"Match": { "Path": "/api/identity/{**catch-all}" },
"Transforms": [{ "PathRemovePrefix": "/api/identity" }]
"Match": { "Path": "/api/identity/{**catch-all}" }
},
"customer-route": {
"ClusterId": "customer-cluster",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Other service routes may have the same prefix-stripping mismatch that was fixed here for identity

The identity route's PathRemovePrefix was removed because the Identity service controller uses [Route("api/[controller]")] (IdentityController.cs:9), which means it expects the full path /api/identity/.... The same pattern applies to the other services — for example, CustomerController uses [Route("api/[controller]")] (Customer.API/Controllers/CustomerController.cs:6), resolving to api/customer (singular). But the gateway matches /api/customers/ (plural) and strips that prefix, forwarding bare paths like / or /{id} to the customer service, which expects api/customer/.... This means the customer, order, product, and notification routes likely have the same bug that was just fixed for identity — the PathRemovePrefix transforms would result in 404s unless those services use different route prefixes or the controller names happen to match the plural gateway paths. Worth verifying whether the remaining four routes need the same fix.

(Refers to lines 16-34)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid observation — the other service routes may indeed have similar routing mismatches (especially the plural/singular discrepancy like /api/customers/ vs api/customer). However, this PR is intentionally scoped to the identity route only per task requirements. The other routes should be evaluated and fixed in a separate PR.

Expand Down