diff --git a/.idea/.idea.ApiEfCoreLibrary/.idea/data_source_mapping.xml b/.idea/.idea.ApiEfCoreLibrary/.idea/data_source_mapping.xml new file mode 100644 index 0000000..4236fb7 --- /dev/null +++ b/.idea/.idea.ApiEfCoreLibrary/.idea/data_source_mapping.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/.idea.ApiEfCoreLibrary/.idea/queries/Query.sql b/.idea/.idea.ApiEfCoreLibrary/.idea/queries/Query.sql new file mode 100644 index 0000000..e69de29 diff --git a/.idea/.idea.ApiEfCoreLibrary/.idea/sqldialects.xml b/.idea/.idea.ApiEfCoreLibrary/.idea/sqldialects.xml new file mode 100644 index 0000000..839f26f --- /dev/null +++ b/.idea/.idea.ApiEfCoreLibrary/.idea/sqldialects.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ApiEfCoreLibrary/Program.cs b/ApiEfCoreLibrary/Program.cs index c662c40..7ed7502 100644 --- a/ApiEfCoreLibrary/Program.cs +++ b/ApiEfCoreLibrary/Program.cs @@ -12,17 +12,14 @@ builder.Services .AddFastEndpoints() .AddCors(options => { - options.AddPolicy("AllowAll", policy => - { - policy.AllowAnyOrigin() - .AllowAnyMethod() - .AllowAnyHeader(); + options.AddDefaultPolicy( policy => + { + policy.AllowAnyOrigin(); }); }) .SwaggerDocument(options => { options.ShortSchemaNames = true; - }); // On ajoute ici la configuration de la base de données @@ -41,6 +38,6 @@ app//.UseAuthentication() app.UseHttpsRedirection(); -app.UseCors("AllowAll"); +app.UseCors(); app.Run(); \ No newline at end of file