diff --git a/build/docker-compose.public.yml b/build/docker-compose.public.yml index 225e0eb..31605f0 100644 --- a/build/docker-compose.public.yml +++ b/build/docker-compose.public.yml @@ -1,9 +1,7 @@ services: guestbooky-be: - build: - context: ../ - dockerfile: build/guestbooky-be/Dockerfile + image: cotti/guestbooky-be container_name: guestbooky-be ports: - "8080:8080" diff --git a/src/Guestbooky/Guestbooky.API/Program.cs b/src/Guestbooky/Guestbooky.API/Program.cs index d23ef8e..c804c51 100644 --- a/src/Guestbooky/Guestbooky.API/Program.cs +++ b/src/Guestbooky/Guestbooky.API/Program.cs @@ -74,9 +74,10 @@ namespace Guestbooky.API var corsOrigins = builder.Configuration[Constants.CORS_ORIGINS]?.Split(',') ?? Array.Empty(); cfg.AddPolicy(name: "local", policy => { - policy.WithOrigins(corsOrigins); - policy.AllowAnyHeader(); - policy.AllowAnyMethod(); + policy.WithExposedHeaders("Content-Range", "Accept-Ranges") + .WithOrigins(corsOrigins) + .AllowAnyHeader() + .WithMethods("GET", "POST", "DELETE", "OPTIONS"); }); });