Skip to content

Commit

Permalink
fixed the most important things for a working poc:
Browse files Browse the repository at this point in the history
invariantculture & cors issues
  • Loading branch information
macel94 committed Jan 19, 2024
1 parent dc15b09 commit 1e69bf4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/BlazorPong.SignalR/BlazorPong.SignalR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<UserSecretsId>afca5fd7-889a-4b24-b1b5-d4870744eb51</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
Expand Down
12 changes: 12 additions & 0 deletions src/BlazorPong.SignalR/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@
builder.AddAzureSql();
builder.AddHostedServices();
builder.AddGameServices();
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowAnyOriginPolicy",
builder =>
{
builder.AllowAnyOrigin()
.AllowAnyHeader()
.AllowAnyMethod();
});
});


var app = builder.Build();
app.UseCors("AllowAnyOriginPolicy");
app.MapHub<GameHub>("/gamehub");

app.Run();
2 changes: 1 addition & 1 deletion src/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
webapp:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- GameHubEndpoint=http://signalr:6351/gamehub
- GameHubEndpoint=http://localhost:6351/gamehub
ports:
- "6350:8080"
# volumes:
Expand Down
4 changes: 4 additions & 0 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ services:
build:
context: .
dockerfile: BlazorPong.SignalR/Dockerfile
redis:
image: "redis:latest"
azuresql:
image: "mcr.microsoft.com/azure-sql-edge:latest"

# blazorpong.web.server.2:
# image: ${DOCKER_REGISTRY-}blazorpongwebserver
Expand Down

0 comments on commit 1e69bf4

Please sign in to comment.