|
14 | 14 | app.UseGrpcWeb();
|
15 | 15 |
|
16 | 16 | 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"); |
18 | 19 |
|
19 | 20 | app.Run();
|
20 | 21 | // </snippet_WebEnable>
|
|
34 | 35 | app.UseGrpcWeb(new GrpcWebOptions { DefaultEnabled = true });
|
35 | 36 |
|
36 | 37 | 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"); |
38 | 41 |
|
39 | 42 | app.Run();
|
40 | 43 | // </snippet_WebEnableAllServices>
|
|
53 | 56 | builder.AllowAnyOrigin()
|
54 | 57 | .AllowAnyMethod()
|
55 | 58 | .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"); |
57 | 62 | }));
|
58 | 63 |
|
59 | 64 | var app = builder.Build();
|
|
64 | 69 | app.MapGrpcService<GreeterService>().EnableGrpcWeb()
|
65 | 70 | .RequireCors("AllowAll");
|
66 | 71 |
|
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"); |
68 | 75 |
|
69 | 76 | app.Run();
|
70 | 77 | // </snippet_WebEnableCORS>
|
|
0 commit comments