Skip to content
Discussion options

You must be logged in to vote

How to map internal endpoint in Ocelot API gateway?

Ocelot is not designed to host endpoints because it's a routing software! It doesn't act as an API endpoint host; instead, Ocelot functions as a traffic router based on routes and URL paths ❕ At last, Ocelot functions as a reverse proxy!

The endpoints in the same project where ocelot is configured do not work. I get 404. Is there any way to map internal routes.

404 is correct behavior. In Getting Started chapter we don't recommend attaching additional endpoints via app.Map* methods. The Ocelot pipeline is not compatible with classic API endpoints for hosting.

Is there any way to map internal routes.

app.MapGet("/test", () => "Hello …

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@raman-m
Comment options

@lujamaharjan
Comment options

@raman-m
Comment options

@lujamaharjan
Comment options

@raman-m
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Middlewares Ocelot feature: Middleware Injection Routing Ocelot feature: Routing Core Ocelot Core related or system upgrade (not a public feature)
2 participants