diff --git a/package.json b/package.json index 5403eadb..2e1c898b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angor", - "version": "0.0.57", + "version": "0.0.58", "license": "MIT", "scripts": { "version": "node -p \"require('./package.json').version\"", diff --git a/src/Angor/Server/Program.cs b/src/Angor/Server/Program.cs index 6632dbf8..6443677c 100644 --- a/src/Angor/Server/Program.cs +++ b/src/Angor/Server/Program.cs @@ -39,6 +39,16 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); //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. @@ -61,6 +71,8 @@ app.UseRouting(); +// Use the CORS policy +app.UseCors("AllowSpecificOrigin"); app.MapRazorPages(); app.MapControllers(); diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 90ed6af1..41e9325b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 0.0.57 + 0.0.58 net7.0 Blockcore MIT