Skip to content

Commit

Permalink
fix(server): cors
Browse files Browse the repository at this point in the history
  • Loading branch information
RyushiAok committed Nov 5, 2023
1 parent 17e4666 commit 9a49184
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions server/src/Api/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ let main _ =
options.AddPolicy(
"CorsPolicy",
fun policyBuilder ->
policyBuilder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()
// policyBuilder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()
//
// Note: The URLs must not end with a /
// .WithOrigins(
// [|
// env.client_url
// "http://localhost:3000"
// "https://duck-stream.doer-app.com/"
// |]
// )
policyBuilder
.AllowAnyHeader()
.AllowAnyMethod()
.WithOrigins(
[|
env.client_url
"http://localhost:3000"
"https://duck-stream.doer-app.com/"
|]
)
|> ignore
))

Expand Down

0 comments on commit 9a49184

Please sign in to comment.