Skip to content

Commit

Permalink
Config fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Oct 2, 2023
1 parent 0b80b42 commit be62dcc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
8 changes: 8 additions & 0 deletions Gallery.Unified.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@
.AddBrowserConsole()
.SetMinimumLevel(LogLevel.Trace)
);

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// builder.Services.AddScoped<AuthenticationStateProvider>(s => s.GetRequiredService<ServiceStackStateProvider>());

var apiBaseUrl = builder.Configuration["ApiBaseUrl"] ?? builder.HostEnvironment.BaseAddress;
builder.Services.AddBlazorApiClient(apiBaseUrl);


await builder.Build().RunAsync();
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"Microsoft.AspNetCore": "Warning"
}
},
"ApiBaseUrl": "localhost:7086"

}
20 changes: 14 additions & 6 deletions Gallery.Unified/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,27 @@
app.UseHsts();
}

//app.UseBlazorFrameworkFiles();

app.UseHttpsRedirection();

app.UseStaticFiles();

app.UseRouting();
// app.UseRouting();

app.UseServiceStack(new AppHost());

app.MapRazorPages();
app.MapControllers();
app.MapFallbackToFile("index.html");
// app.UseEndpoints(endpoints =>
// {
// endpoints.MapRazorPages();
// endpoints.MapControllers();
// endpoints.MapFallbackToFile("index.html");
// });

// app.MapRazorPages();
// app.MapControllers();
// app.MapFallbackToFile("index.html");

// app.UseBlazorFrameworkFiles();


BlazorConfig.Set(new BlazorConfig
{
Expand Down

0 comments on commit be62dcc

Please sign in to comment.