Skip to content

Commit

Permalink
Allow cores on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Aug 5, 2024
1 parent fd01369 commit 9edff62
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angor",
"version": "0.0.57",
"version": "0.0.58",
"license": "MIT",
"scripts": {
"version": "node -p \"require('./package.json').version\"",
Expand Down
12 changes: 12 additions & 0 deletions src/Angor/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
builder.Services.AddSingleton<ITaprootScriptBuilder, TaprootScriptBuilder>();
builder.Services.AddSingleton<ITestNostrSigningFromRelay, TestNostrSigningFromRelay>(); //TODO change this from a test class when the flow is complete


// Add CORS services
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowSpecificOrigin",
builder => builder.WithOrigins("https://test.angor.io")
.AllowAnyHeader()
.AllowAnyMethod());
});

var app = builder.Build();

// Configure the HTTP request pipeline.
Expand All @@ -61,6 +71,8 @@

app.UseRouting();

// Use the CORS policy
app.UseCors("AllowSpecificOrigin");

app.MapRazorPages();
app.MapControllers();
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.0.57</Version>
<Version>0.0.58</Version>
<TargetFramework>net7.0</TargetFramework>
<Authors>Blockcore</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down

0 comments on commit 9edff62

Please sign in to comment.