Skip to content

Commit

Permalink
fix: server
Browse files Browse the repository at this point in the history
  • Loading branch information
RyushiAok committed Nov 5, 2023
1 parent bf50fd0 commit acf6c05
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions server/src/Api/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ let main _ =
Response.ofJson envInfo

webHost [||] {
use_cors "CorsPolicy" (fun options ->
options.AddPolicy(
"CorsPolicy",
fun builder ->
builder.AllowAnyHeader() |> ignore
builder.AllowAnyMethod() |> ignore
builder.AllowAnyOrigin().AllowCredentials() |> ignore
))
// use_cors "CorsPolicy" (fun options ->
// options.AddPolicy(
// "CorsPolicy",
// fun builder ->
// builder.AllowAnyHeader() |> ignore
// builder.AllowAnyMethod() |> ignore
// builder.AllowAnyOrigin() |> ignore
// builder.AllowCredentials() |> ignore
// ))

endpoints [
get "/" (Response.ofJson {| hello = "world" |})
Expand Down

0 comments on commit acf6c05

Please sign in to comment.