-
We are preparing to transfer NGINX services to YARP. We found some problems during the test and want to ask for advice. YARP version:
Program.cs
appsettings.Development.json
We are a container environment. CD will deploy each service to AAA, BBB, and CCC Docker hosts. For example, the Doc service on port 7000 and the Portal service on port 7002. Original architecture:
Alternative architecture:
Running log
In the beginning, 「"Path": "/{**remainder}"」 can directly access one of the host Portal services of AAA, BBB, and CCC as expected. However, when accessing the host of route rule 「"Path": "/teamdoc/{*remainder}"」 (the last two records in the log), YARP will be changed to 301 redirect, which will change the URL and lose the role of proxy. I have tried many settings. In addition to the access of the root path, as long as the access of the sub-path has multiple destinations, the request will be made in the behavior of 301 redirect, which bothers me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
What's the Location header included in the 301s? We need to understand why the destination is redirecting before we can suggest how to fix it. |
Beta Was this translation helpful? Give feedback.
What's the Location header included in the 301s? We need to understand why the destination is redirecting before we can suggest how to fix it.