forked from MDCPS/DamageAssessment_Backend
		
	Updated CORS statements Policy
This commit is contained in:
		| @ -9,6 +9,10 @@ using System.Reflection; | ||||
| using System.Text; | ||||
|  | ||||
| var builder = WebApplication.CreateBuilder(args); | ||||
| builder.Services.AddCors(p => p.AddPolicy("DamageAppCorsPolicy", build => { | ||||
|     build.WithOrigins("*").AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin(); | ||||
| })); | ||||
|  | ||||
| var authkey = builder.Configuration.GetValue<string>("JwtSettings:securitykey"); | ||||
| builder.Services.AddAuthentication(item => | ||||
| { | ||||
| @ -85,6 +89,7 @@ if (app.Environment.IsDevelopment()) | ||||
|     app.UseSwagger(); | ||||
|     app.UseSwaggerUI(); | ||||
| } | ||||
| app.UseCors("DamageAppCorsPolicy"); | ||||
| app.UseAuthentication(); | ||||
| app.UseAuthorization(); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user