Archived
Private
Public Access
1
0

v0.0.1 (download not working)

This commit is contained in:
2023-04-30 20:50:39 +02:00
parent 227af36c05
commit 4f6c0a00be
116 changed files with 1460 additions and 356 deletions

View File

@@ -1,10 +1,13 @@
using PuppeteerSharp;
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddCors(options => {
options.AddPolicy("BetterIserv", policy => {
policy.WithOrigins("http://localhost", "http://localhost:8100")
.AllowAnyHeader()
.AllowAnyMethod();
});
});
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
@@ -19,12 +22,7 @@ if (app.Environment.IsDevelopment()) {
app.UseSwaggerUI();
}
app.UseCors(options => {
options.WithOrigins("http://localhost:8100");
options.AllowCredentials();
options.AllowAnyHeader();
options.AllowAnyMethod();
});
app.UseCors("BetterIserv");
app.UseAuthorization();