Skip to content

Case Sensitive API endpoint: /api/Apps/ #1643

@InRiPa

Description

@InRiPa

Accessing the main page at https://portal.example.com/ and checking the console with Developer Tools of the browser, i can see (CORS) errors accessing the endpoint https://portal-backend.example.com/api/Apps/subscribed/subscriptions/

Investigating this further it seems to be an issue related to /api/*A*pps/ and /api/*a*pps/

I'm not sure if this is the exact line in question but i grep'ed through the frontend and backend and this was the line that came up:

In src/features/apps/apiSlice.ts line 29:

const subscriptionStatus = await fetchWithBQ(
  '/api/Apps/subscribed/subscriptions'
)

Furthermore, to verify the actual endpoint, I checked the swagger ui
https://portal-backend.example.com/api/apps/swagger/index.html
It confirms the endpoint to be: /api/apps/subscribed/subscriptions

Current Behavior

curl -L https://portal-backend.example.com/api/Apps/subscribed/subscriptions
404 page not found

Expected Behavior

curl -L https://portal-backend.example.com/api/apps/subscribed/subscriptions
{
  "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.1",
  "title": "The server encountered an unexpected condition.",
  "status": 401,
  "errors": {
    "unknown": [
      "Unauthorized access"
    ]
  },
  "errorId": "427defe3-3a19-426b-8353-f50be502e46a",
  "details": [
    {
      "errorCode": "UnauthorizedAccess",
      "type": "UnauthorizedAccessException",
      "message": "Unauthorized access",
      "parameters": []
    }
  ]
}

Can anyone verify this issue? If not, maybe this might be the issue, with different backend components that host the application (ignoring case sensitivity). For example, I'm not using the nginx ingress.

If this is confirmed, I can create a Pull request if you want.

Steps To Reproduce

Open https://portal.example.com/ and login. Then check for the API call https://portal-backend.example.com/api/Apps/subscribed/subscriptions/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    NEW USER REQUEST

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions