Yuyuqt commited on
Commit
ace6185
·
1 Parent(s): a000e36

Fix CORS and production URLs

Browse files
Backend/Program.cs CHANGED
@@ -41,7 +41,12 @@ else if (File.Exists("LibraryFirebase.json"))
41
  builder.Services.AddCors(options =>
42
  {
43
  options.AddPolicy("AllowWasm",
44
- policy => policy.WithOrigins("https://localhost:7058", "http://localhost:5158")
 
 
 
 
 
45
  .AllowAnyMethod()
46
  .AllowAnyHeader());
47
  });
 
41
  builder.Services.AddCors(options =>
42
  {
43
  options.AddPolicy("AllowWasm",
44
+ policy => policy.WithOrigins(
45
+ "https://localhost:7058",
46
+ "http://localhost:5158",
47
+ "https://librarymanagement-eosin-omega.vercel.app",
48
+ "https://yuruyuruu-librarymanagement.hf.space"
49
+ )
50
  .AllowAnyMethod()
51
  .AllowAnyHeader());
52
  });
BlazorWebAssembly/Program.cs CHANGED
@@ -11,7 +11,7 @@ builder.RootComponents.Add<App>("#app");
11
  builder.RootComponents.Add<HeadOutlet>("head::after");
12
 
13
  // Add HttpClient with Backend address
14
- builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7028/") });
15
 
16
  // Add Blazored LocalStorage
17
  builder.Services.AddBlazoredLocalStorage();
 
11
  builder.RootComponents.Add<HeadOutlet>("head::after");
12
 
13
  // Add HttpClient with Backend address
14
+ builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://yuruyuruu-librarymanagement.hf.space/") });
15
 
16
  // Add Blazored LocalStorage
17
  builder.Services.AddBlazoredLocalStorage();