Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routes became case-sensitive after updating from 23.3.6 to 23.4.0 #2209

Closed
cmgchess opened this issue Nov 20, 2024 · 1 comment · Fixed by #2210
Closed

routes became case-sensitive after updating from 23.3.6 to 23.4.0 #2209

cmgchess opened this issue Nov 20, 2024 · 1 comment · Fixed by #2210
Assignees
Labels
accepted Bug or feature would be accepted as a PR or is being worked on bug Identified as a potential bug merged Issue has been merged to dev and is waiting for the next release Nov'24 November 2024 release Routing Ocelot feature: Routing
Milestone

Comments

@cmgchess
Copy link

cmgchess commented Nov 20, 2024

Expected Behavior / New Feature

I expected the route to hit

Actual Behavior / Motivation for New Feature

Route didn't hit. Got 400 error .

Steps to Reproduce the Problem

  1. Updated Ocelot and Ocelot.Cache.CacheManager from 23.3.6 to 23.4.0
  2. I called this from my frontend. Notice the uppercase letters of the request issued.
getEntityRecords(id: number): Observable<EventLogData[]> {
  const url = 'https://blablabla.azurecontainerapps.io/Entities/${id}/Events/RecordsData';
  return this.httpClient.get<EventLogData[]>(url);
}

ocelot.json looks like this

{
  "Routes": [
    {
      "DownstreamPathTemplate": "/api/entities/{id}/events/recordsdata",
      "DownstreamScheme": "https",
      "DownstreamHostAndPorts": [
        {
          "Host": "blabla-service.net",
          "Port": 443
        }
      ],
      "UpstreamPathTemplate": "/entities/{id}/events/recordsdata",
      "UpstreamHttpMethod": [
        "GET"
      ],
      "FileCacheOptions": {
        "TtlSeconds": 0,
        "Region": "UserCache"
      },
      "RouteClaimsRequirement": {
        "Claims": "ReadEntities"
      }
    }
  ],
  "GlobalConfiguration": {
    "BaseUrl": "https://blablabla.azurecontainerapps.io"
  }
}
  1. What's interesting is when I send the request const url = 'https://blablabla.azurecontainerapps.io/entities/${id}/events/recordsdata'; i.e same case as defined in ocelot it worked. The docs mention that it is case-insensitive by default. Is this expected behavior in 23.4.0 or have i missed something.

Specifications

  • Version: 23.4.0
  • Platform: .NET 8
  • Subsystem: Windows
@ggnaegi
Copy link
Member

ggnaegi commented Nov 20, 2024

@cmgchess Hello, thanks for your feedback, indeed, it might be a side effect of the new routing.
Some Testcases are missing. Then, it's a bug, and we will provide a Hotfix. Thanks for your feedback!

@ggnaegi ggnaegi self-assigned this Nov 20, 2024
@ggnaegi ggnaegi added bug Identified as a potential bug accepted Bug or feature would be accepted as a PR or is being worked on labels Nov 20, 2024
@raman-m raman-m added Routing Ocelot feature: Routing Nov'24 November 2024 release labels Nov 21, 2024
@raman-m raman-m added this to the November'24 milestone Nov 21, 2024
@raman-m raman-m added the merged Issue has been merged to dev and is waiting for the next release label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Bug or feature would be accepted as a PR or is being worked on bug Identified as a potential bug merged Issue has been merged to dev and is waiting for the next release Nov'24 November 2024 release Routing Ocelot feature: Routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants