© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•12mo ago•
1 reply
Johnny 🌸

Ocelot SignalR -> Cookies not sent to endpoint

  {
    "DownstreamPathTemplate": "/hubs/{everything}",
    "UpstreamPathTemplate": "/CustomChat/hubs/{everything}",
    "UpstreamHttpMethod": [ "Get", "Post", "Delete", "Put", "Patch" ],
    "DownstreamScheme": "ws",
    "RequestHeadersToForward": [
      "Content-Type",
      "Authorization",
      "x-tenant-id",
      "x-site-id",
      "cache-control",
      "content-disposition",
      "Cookie"
    ],
    "DownstreamHostAndPorts": [
      {
        "Host": "localhost",
        "Port": 5502
      }
    ],
    "SwaggerKey": "CustomService",
    "EnableWebsockets": true,
    "PreserveRequestCookies": true,
    "AuthenticationOptions": {
      "AuthenticationProviderKey": "Bearer",
      "AllowedScopes": []
    },
    "UpstreamHeaderTransform": {
      "Cookie": "{Request.Cookies}"
    }
  }
],
"SwaggerEndPoints": [
  {
    "ReRouteKey": "CoreService",
    "Key": "CoreService",
    "Config": [
      {
        "Name": "Core Service API",
        "Version": "v1",
        "Url": "http://localhost:5500/openapi/v1.json"
      }
    ]

  },
  {
    "DownstreamPathTemplate": "/hubs/{everything}",
    "UpstreamPathTemplate": "/CustomChat/hubs/{everything}",
    "UpstreamHttpMethod": [ "Get", "Post", "Delete", "Put", "Patch" ],
    "DownstreamScheme": "ws",
    "RequestHeadersToForward": [
      "Content-Type",
      "Authorization",
      "x-tenant-id",
      "x-site-id",
      "cache-control",
      "content-disposition",
      "Cookie"
    ],
    "DownstreamHostAndPorts": [
      {
        "Host": "localhost",
        "Port": 5502
      }
    ],
    "SwaggerKey": "CustomService",
    "EnableWebsockets": true,
    "PreserveRequestCookies": true,
    "AuthenticationOptions": {
      "AuthenticationProviderKey": "Bearer",
      "AllowedScopes": []
    },
    "UpstreamHeaderTransform": {
      "Cookie": "{Request.Cookies}"
    }
  }
],
"SwaggerEndPoints": [
  {
    "ReRouteKey": "CoreService",
    "Key": "CoreService",
    "Config": [
      {
        "Name": "Core Service API",
        "Version": "v1",
        "Url": "http://localhost:5500/openapi/v1.json"
      }
    ]

  },


For some reason this configuraiton doestn take cookies or anything else to the specific service. Using the service along works with signalR
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

OpenApi Login endpoint with cookies
C#CC# / help
2mo ago
✅ SignalR Not working
C#CC# / help
4mo ago
✅ Ocelot unable to find /videos
C#CC# / help
2y ago
❔ Ocelot with Swagger
C#CC# / help
3y ago