Block calls from different HTTP methods to SignalR Negotiate

Viewed 43

Is there any way to block calls to different HTTP methods to the /signalr/negotiate endpoint or can I control who has access to certain methods such as DELETE or POST to only authorized users?

Example:
GET http://<url>/signalr/negotiate.

{
    "Url": "/signalr",
    "ConnectionToken": "VUxdTT7N1dy3FNsGaFKQ1KuIe2uAwGP6k4VUeRJoDFJGey5kZbn6ikTn8kIMI36IwziZsALkhTa+wV8zF95H5oc6oPN5fkQP2AAKV3ErZCuhudT238bIFikKMe4JwWZS",
    "ConnectionId": "dcf87822-8d06-455c-b7aa-4c13062508c5",
    "KeepAliveTimeout": 20.0,
    "DisconnectTimeout": 30.0,
    "ConnectionTimeout": 110.0,
    "TryWebSockets": true,
    "ProtocolVersion": "1.2",
    "TransportConnectTimeout": 5.0,
    "LongPollDelay": 0.0
}

I want to authorize the request above and block the request below.

Example:
DELETE http://<url>/signalr/negotiate.

{
    "Url": "/signalr",
    "ConnectionToken": "GugvYqIryiWURPDKrOhssbKU5ibFbnwK5Fl/tshe3EkQMTlTCJ90Ci+lNLGewyDXD8xmDATDgIQgZkf4ZrsVnR5KrE41+kmi/86otjDeqir72STo00MhIIwJOtBnpFkC",
    "ConnectionId": "6bb4c463-07c3-4f30-b988-9f781b2360a9",
    "KeepAliveTimeout": 20.0,
    "DisconnectTimeout": 30.0,
    "ConnectionTimeout": 110.0,
    "TryWebSockets": true,
    "ProtocolVersion": "1.2",
    "TransportConnectTimeout": 5.0,
    "LongPollDelay": 0.0
}
0 Answers
Related