I have created a basic chathub with signalr and want YARP to forward all the WS://<>/chat/ trafic to my API service; could anyway please share the YARP config file just to forward all the websocket traffic to an endpoint.
Any pointers would help.
I have created a basic chathub with signalr and want YARP to forward all the WS://<>/chat/ trafic to my API service; could anyway please share the YARP config file just to forward all the websocket traffic to an endpoint.
Any pointers would help.
If you have YARP running already, just provide the config via app settings:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ReverseProxy": {
"Routes": {
"route1": {
"ClusterId": "cluster1",
"Match": {
"Path": "/path/to/match/{*path}"
}
}
},
"Clusters": {
"cluster1": {
"Destinations": {
"cluster1/destination1": {
"Address": "http://localhost:5000/"
}
}
}
}
}
}
If you have something a bit more concrete that you're playing with locally that is not working, please provide it here and I'll help if I can. For more details, check out the YARP docs, the above config is mostly a copy paste of their out of the box config.