Skip to content

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

@cmgchess

Description

@cmgchess

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

Metadata

Metadata

Assignees

Labels

Nov'24November 2024 releaseRoutingOcelot feature: RoutingacceptedBug or feature would be accepted as a PR or is being worked onbugIdentified as a potential bugmergedIssue has been merged to dev and is waiting for the next release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions