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

Can't request to endpoint with dynamic PathTemplate #1020

Closed
MinhMit opened this issue Sep 20, 2019 · 2 comments
Closed

Can't request to endpoint with dynamic PathTemplate #1020

MinhMit opened this issue Sep 20, 2019 · 2 comments

Comments

@MinhMit
Copy link

MinhMit commented Sep 20, 2019

Expected Behavior / New Feature

Need request to endpoint when use dynamic {everythings}

Actual Behavior / Motivation for New Feature

I have a service with url:

http://logging.mydomain.com/api/logs
http://logging.mydomain.com/api/logs/trace
http://logging.mydomain.com/api/logs/write
And a api gateway with url:
http://api.mydomain.com

in ocelot configuration file:

{
  "ReRoutes": [
    {
      "DownstreamPathTemplate": "/api/logs/{everything}",
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
        {
          "Host": "logging.mydomain.com",
          "Port": 80
        }
      ],
      "UpstreamPathTemplate": "/logs/{everything}",
      "UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete", "Options" ]
    }
  ],
  "GlobalConfiguration": {
    "BaseUrl": "http://api.mydomain.com"
  }
}

I just can redirect to
http://logging.mydomain.com/api/logs/trace
http://logging.mydomain.com/api/logs/write
and can't redirect to
http://logging.mydomain.com/api/logs

Thanks for your support

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform: .net core 2.2
  • Subsystem:
@raman-m
Copy link
Member

raman-m commented Mar 17, 2024

"DownstreamPathTemplate": "/api/logs/{everything}",
and can't redirect to http://logging.mydomain.com/api/logs

This issue was fixed by PR #1911 and released in version 23.0
See: Empty Placeholders feature
Please use the latest versions 23.0+ ❗

@raman-m raman-m closed this as completed Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants