From 8fac89132faad1aebec067151f6970bf820f40ff Mon Sep 17 00:00:00 2001 From: AOKI Takashi <55625375+RyushiAok@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:31:43 +0900 Subject: [PATCH] fix(server): cors --- server/src/Api/Program.fs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/src/Api/Program.fs b/server/src/Api/Program.fs index 9cb33c0..5276aa4 100644 --- a/server/src/Api/Program.fs +++ b/server/src/Api/Program.fs @@ -114,7 +114,15 @@ let main _ = fun builder -> builder.AllowAnyHeader() |> ignore builder.AllowAnyMethod() |> ignore - builder.AllowAnyOrigin() |> ignore + + builder.WithOrigins( + [| + env.client_url + "http://localhost" + "https://duck-stream.vercel.app" + |] + ) + |> ignore )) endpoints [