Skip to content

Commit 57254e8

Browse files
authored
docs: Add Grpc-Status-Details-Bin to exposed headers in grpcweb docs (#35733)
1 parent 9ccf5a4 commit 57254e8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

aspnetcore/grpc/grpcweb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: jamesnk
44
description: Learn how to configure gRPC services on ASP.NET Core to be callable from browser apps using gRPC-Web.
55
monikerRange: '>= aspnetcore-3.0'
66
ms.author: wpickett
7-
ms.date: 04/29/2025
7+
ms.date: 07/10/2025
88
uid: grpc/grpcweb
99
---
1010
# gRPC-Web in ASP.NET Core gRPC apps

aspnetcore/grpc/grpcweb/sample/8.x/GrpcGreeter/Program.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
app.UseGrpcWeb();
1515

1616
app.MapGrpcService<GreeterService>().EnableGrpcWeb();
17-
app.MapGet("/", () => "This gRPC service is gRPC-Web enabled and is callable from browser apps using the gRPC-Web protocol");
17+
app.MapGet("/", () => "This gRPC service is gRPC-Web enabled and is " +
18+
"callable from browser apps using the gRPC-Web protocol");
1819

1920
app.Run();
2021
// </snippet_WebEnable>
@@ -34,7 +35,9 @@
3435
app.UseGrpcWeb(new GrpcWebOptions { DefaultEnabled = true });
3536

3637
app.MapGrpcService<GreeterService>();
37-
app.MapGet("/", () => "All gRPC service are supported by default in this example, and are callable from browser apps using the gRPC-Web protocol");
38+
app.MapGet("/", () => "All gRPC service are supported by default in " +
39+
"this example, and are callable from browser apps using the " +
40+
"gRPC-Web protocol");
3841

3942
app.Run();
4043
// </snippet_WebEnableAllServices>
@@ -53,7 +56,9 @@
5356
builder.AllowAnyOrigin()
5457
.AllowAnyMethod()
5558
.AllowAnyHeader()
56-
.WithExposedHeaders("Grpc-Status", "Grpc-Message", "Grpc-Encoding", "Grpc-Accept-Encoding");
59+
.WithExposedHeaders("Grpc-Status", "Grpc-Message",
60+
"Grpc-Encoding", "Grpc-Accept-Encoding",
61+
"Grpc-Status-Details-Bin");
5762
}));
5863

5964
var app = builder.Build();
@@ -64,7 +69,9 @@
6469
app.MapGrpcService<GreeterService>().EnableGrpcWeb()
6570
.RequireCors("AllowAll");
6671

67-
app.MapGet("/", () => "This gRPC service is gRPC-Web enabled, CORS enabled, and is callable from browser apps using the gRPC-Web protocol");
72+
app.MapGet("/", () => "This gRPC service is gRPC-Web enabled, CORS " +
73+
"enabled, and is callable from browser apps using the gRPC-Web " +
74+
"protocol");
6875

6976
app.Run();
7077
// </snippet_WebEnableCORS>

0 commit comments

Comments
 (0)