-
When I run the reverse-proxy from Visual Studio and then use Postman to POST http://localhost:5000/wsirates What I am doing wrong? (I am a newbie to this kind of stuff) Here's my appsettings.json {
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ReverseProxy": {
"Routes": [
{
"RouteId": "app2",
"ClusterId": "cluster1",
"Match": {
"Methods": [ "GET", "POST" ],
"Hosts": [ "localhost" ],
"Path": "/wsirates/"
}
},
{
"RouteId": "route2",
"ClusterId": "cluster2",
"Match": {
"Hosts": [ "localhost" ]
}
}
],
"Clusters": {
"cluster1": {
"LoadBalancing": {
"Mode": "Random"
},
"Destinations": {
"cluster1_destination1": {
"Address": "http://testserver/Test/api/rates/"
},
"cluster1_destination2": {
"Address": "http://testserver/Test/api/rates/"
}
}
},
"cluster2": {
"Destinations": {
"cluster2_destination1": {
"Address": "http://testserver/Test/api/rates/"
}
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
What site binding do you have set up in IIS? |
Beta Was this translation helpful? Give feedback.
-
IIS is at the default setup |
Beta Was this translation helpful? Give feedback.
-
One reason is because I am a (newbie at this) I have a lot of programming experience, but not with poxy or reverse proxy. So I am kind of walking in a room at night with no lights on sort of speak, but we have to start someplace and this is my starting place. This is how I understand this (oversimplified of course). A program makes a POST call to http://testserver/wsirates with some data and the reverse-proxy should receive this call and forward this call with data to some other website defined in the appsettings.json file |
Beta Was this translation helpful? Give feedback.
-
All, I see your issue.
Remove the Hosts line, it's only matching requests to localhost, not to testserver. That's why you get the 404. If you don't specify a host then all are allowed. |
Beta Was this translation helpful? Give feedback.
-
Thank you very very much, you saved me countless hours! I have nothing but praise for you, not only for developing great software but to put up with people like me. And trying to help me. Peter. |
Beta Was this translation helpful? Give feedback.
Thank you very very much, you saved me countless hours!
I have nothing but praise for you, not only for developing great software but to put up with people like me. And trying to help me.
At first, I tried Coddy as the reverse proxy server, but after posting a probably dumb question I was insulted by the owner of the software, he said that I should first learn how to use computers before trying software like this. Needless to say, that was the last question I posted anything on their website or used Caddy. Then I came here and from day one I have been treated with nothing but respect even when I post dumb questions. So Thank You very much! And Thank You for solving my issue.
Peter.