Skip to content

Commit 5be81c8

Browse files
authored
Made edits per Acrolink's suggestions
1 parent 207de4b commit 5be81c8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/azure-signalr/signalr-howto-work-with-azure-front-door.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ ms.topic: how-to
1212

1313
Azure Front Door is a modern cloud-native application delivery network (ADN) that provides dynamic site acceleration, global load balancing, TLS termination, and application layer security. It operates at the HTTP/HTTPS layer (Layer 7) and acts as the entry point for web applications—routing and optimizing traffic based on attributes such as URL paths, latency, and health status of backends.
1414

15-
A key benefit of Azure Front Door is its native support for WebSocket and WebSocket Secure (WSS) connections. This enables real-time, bi-directional communication between clients and backend services without requiring any special configuration.
15+
A key benefit of Azure Front Door is its native support for WebSocket and WebSocket Secure (WSS) connections. This support enables real-time, bi-directional communication between clients and backend services without requiring any special configuration.
1616

1717
In this guide, we demonstrate how to use Azure Front Door with Azure SignalR Service to front-end your real-time applications. By routing traffic through Front Door, you can:
18-
- Leverage WebSocket support with global reach and edge acceleration,
18+
- Apply WebSocket support with global reach and edge acceleration,
1919
- Apply centralized security policies, such as WAF rules and rate limiting,
2020
- Reduce public exposure of your backend services.
2121

22-
As shown in the diagram, you’ll configure Azure Front Door to route WebSocket traffic to your SignalR-powered application backend. This setup ensures that your real-time functionality benefits from low-latency, scalable, and secure traffic handling through Azure’s global edge network.
22+
As shown in the diagram, you configure Azure Front Door to route WebSocket traffic to your SignalR-powered application backend. This setup ensures that your real-time functionality benefits from low-latency, scalable, and secure traffic handling through Azure’s global edge network.
2323

2424
## Set up and configure Azure Front Door
2525

@@ -37,11 +37,11 @@ On the [Azure portal](https://portal.azure.com/), search for **Front Door** and
3737
### Quick test
3838
Conduct quick tests to verify that SignalR endpoint is healthy and Azure Front Door resource is correctly configured.
3939

40-
Send a request to `<your-SignalR-resource-endpoint>/client` and it should return _400_ with error message _'hub' query parameter is required._ This means that the request arrived at SignalR Service and the service performed validation as expected.
40+
Send a request to `<your-SignalR-resource-endpoint>/client` and it should return _400_ with error message _'hub' query parameter is required._ This message means that the request arrived at SignalR Service and the service performed validation as expected.
4141
```bash
4242
curl -v <your-SignalR-resource-endpoint>/client
4343
```
44-
returns
44+
Returns
4545
```
4646
< HTTP/1.1 400 Bad Request
4747
< ...
@@ -55,7 +55,7 @@ Send a request to the same health endpoint of Azure SignalR through Azure Front
5555
```bash
5656
curl -I http://<the-hostname-of-your-Azure-Front-Door-resource>/client
5757
```
58-
It should also return _400_ with error message _'hub' query parameter is required._ This confirms that the request successfully went through Azure Front Door to SignalR Service.
58+
It should also return _400_ with error message _'hub' query parameter is required._ This message confirms that the request successfully went through Azure Front Door to SignalR Service.
5959

6060
```
6161
< HTTP/1.1 400 Bad Request
@@ -66,7 +66,7 @@ Send a request to the same health endpoint of Azure SignalR through Azure Front
6666

6767
### Run a SignalR sample app through Azure Front Door
6868

69-
Now that we have verified that the traffic can reach SignalR Service through Azure Front Door. Next, we use a barebone sample app to demonstrate Azure Front Door's ability to route WebSocket traffic without configuration. We take a step-by-step approach so that you can follow along, if needed.
69+
Now that we can verify that the traffic can reach SignalR Service through Azure Front Door. Next, we use a barebone sample app to demonstrate Azure Front Door's ability to route WebSocket traffic without configuration. We take a step-by-step approach so that you can follow along, if needed.
7070

7171
#### Create the project
7272
```bash
@@ -92,7 +92,7 @@ Paste in the content to the `afd-demo.csproj` file. This project uses only the "
9292
```
9393

9494
#### Configure app settings
95-
Create an `appsettings.json` file and paste in the content below. The values will be referenced in the `Program.cs` file, which we create in the next step.
95+
Create an `appsettings.json` file and paste in the content. The values will be referenced in the `Program.cs` file, which we create in the next step.
9696
```bash
9797
touch appsettings.json
9898
```
@@ -117,7 +117,7 @@ touch appsettings.json
117117
touch Program.cs
118118
```
119119

120-
Paste in the code below to the `Program.cs` file. The web app defines a SignalR hub and serves `index.html` at the web root.
120+
Paste in the code to the `Program.cs` file. The web app defines a SignalR hub and serves `index.html` at the web root.
121121
```csharp
122122
using Microsoft.Azure.SignalR;
123123
var builder = WebApplication.CreateBuilder(args);
@@ -161,7 +161,7 @@ mkdir hubs && cd hubs
161161
touch demohubs.cs
162162
```
163163

164-
Paste in the code below to the `demohubs.cs` file. For simplicity, the hub exposes only `BroadcastMessage` method to SignalR client, which broadcasts the received message to all connected SignalR clients.
164+
Paste in the code to the `demohubs.cs` file. For simplicity, the hub exposes only `BroadcastMessage` method to SignalR client, which broadcasts the received message to all connected SignalR clients.
165165
```csharp
166166
using Microsoft.AspNetCore.SignalR;
167167

@@ -179,7 +179,7 @@ mkdir wwwroot && cd wwwroot
179179
touch index.html
180180
```
181181

182-
Paste in the code below to `index.html`. The user interface consists of a `<textarea>` to receive text input from user and a `<button>` to send the user input through a SignalR connection. Since we defined the SignalR server's behavior to broadcast received messages, you will see the same message logged to the browser console.
182+
Paste in the code to `index.html`. The user interface consists of a `<textarea>` to receive text input from user and a `<button>` to send the user input through a SignalR connection. Since we defined the SignalR server's behavior to broadcast received messages, you see the same message logged to the browser console.
183183
```html
184184
<!DOCTYPE html>
185185
<html>
@@ -231,7 +231,7 @@ Paste in the code below to `index.html`. The user interface consists of a `<text
231231
```
232232

233233
#### Run the app and verify the flow of message through Azure Front Door
234-
That's all the code to the sample. Let's run the app.
234+
That is all the code to the sample. Let's run the app.
235235

236236
```bash
237237
dotnet restore
@@ -242,7 +242,7 @@ Open http://localhost:5129 from the browser and use `F12` keyboard shortcut to
242242

243243
:::image type="content" source="./media/signalr-howto-work-with-azure-front-door/network-panel-afd.jpg" alt-text="Screenshot of the running app establishing a WebSocket connection with Azure Front Door.":::
244244

245-
Try to type something in the text box and hit the send button. You will see the message is logged to browser console as expected.
245+
Try to type something in the text box and hit the send button. You see the message is logged to browser console as expected.
246246

247247
:::image type="content" source="./media/signalr-howto-work-with-azure-front-door/console-log.jpg" alt-text="Screenshot of the received message in browser's console log.":::
248248

0 commit comments

Comments
 (0)