Skip to content

Why doesn't {RemoteIpAddress} placeholder work? #1766

Answered by raman-m
SerkanKutlu asked this question in Q&A
Discussion options

You must be logged in to vote

@SerkanKutlu Hi Serkan!
Because you are newbie to Ocelot! 😉

You were confused by Route Placeholders feature and Headers Transform Placeholders one.
Placeholders in paths are parts of URL you want to extract from upstream URL and substitute to downstream URL.
{RemoteIpAddress} placeholder is the term of Headers Transformation feature, see more: Headers Transformation | Placeholders.
Here is direct search link: Search for {RemoteIpAddress}
So, RemoteIpAddress value can be extracted from headers, so that is why this placeholder is a part of the Header Transformation.
You cannot use {RemoteIpAddress} placeholder in paths!
Or, you can use it, but for URL parts substitutions only, from upstream…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
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
question Initially seen a question could become a new feature or bug or closed ;)
3 participants
Converted from issue

This discussion was converted from issue #1566 on October 30, 2023 17:57.