Replies: 7 comments 4 replies
-
@davidni awesome this all sounds good to me, with PR lets just make sure there are tests for all the functionality you are going to add :D If you can be bothered updating the docs with all of this would also be awesome but I can do that if you dont want to! Really appreciate your contributions. |
Beta Was this translation helpful? Give feedback.
-
@TomPallister quick update since it's been a while. I haven't given up on this issue, but priorities changed a bit and I haven't been able to get to it. I still want to get to it asap, but there's other stuff on the way. As a side note, I'm very happy with the 10.* release and that so many dependencies are gone. Makes it a lot easier for us to consume! Thanks and keep it up. |
Beta Was this translation helpful? Give feedback.
-
@davidni all good! I'm going to take out everything from Ocelot apart from FluentValidation and see where things are. I want to try and make the whole thing more extensible so people can spin up their own packages to get stuff done / maybe override Ocelot's default behaviour. |
Beta Was this translation helpful? Give feedback.
-
I need wildcards to work with multiple staging environments |
Beta Was this translation helpful? Give feedback.
-
@davidni commented on Jul 19, 2018:
Hello Mr. David! Pay attention you've discussed 8th version with Tom, and nowadays we have 19th version for .NET 7. @TomPallister
What do you think? |
Beta Was this translation helpful? Give feedback.
-
Why not to use just Nginx proxy with this functionality? 😉
Ah, got it... You had just idea... and nothing more! 🤣 |
Beta Was this translation helpful? Give feedback.
-
@raman-m Can I work on it ? |
Beta Was this translation helpful? Give feedback.
-
New Feature
Support routes that match wildcard sub-domains such as
*.domain.example.com
(and fix existing bugs in the process -- more on this below :))Motivation for New Feature
ReRoute.UpstreamHost
uses ordinal string comparison and does not support wildcards.Implementation note
For reference, here's what Nginx supports (look under the
Wildcard names
section in particular). My suggestion that seems to align with Nginx ideas:Host: example.com:123
it will not match a route with UpstreamHostexample.com
, which IMHO it obviously shouldexample.com
andexample.com.
should be treated the same)UpstreamHost = "*.example.com"
would be matched with regex^[a-z0-9.-]+\.example\.com$
UpstreamHost = ".example.com"
would be matched with regex^(?:[a-z0-9.-]+\.)?example\.com$
(4) is nice because it is fairly common for a service to want to take over a domain and all of its subdomains, and it offers an easy way to do that with a single route.
I'll start working on this and will send a PR soon (maybe tomorrow). Let me know if you have any concerns or suggestions.
Beta Was this translation helpful? Give feedback.
All reactions