From 1bed4106a7ec6af8c8ac5df3fc2ca4c771c0af1c Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Wed, 12 Jan 2022 19:13:00 +0100 Subject: [PATCH] Updated Cors (markdown) --- Cors.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Cors.md b/Cors.md index 73cfc16..69b2ae1 100644 --- a/Cors.md +++ b/Cors.md @@ -8,7 +8,21 @@ The Same Origin Policy disallows reading the remote resource at http://localhost ``` # Solution -Cors support is not enabled by default, you can enable it yourself when configuring WireMock.Net Server, like: +Cors support is not enabled by default, you can enable it when configuring WireMock.Net Server. + + +## Option 1 + +``` c# +var settings = new WireMockServerSettings +{ + CorsPolicyOptions = CorsPolicyOptions.AllowAll +}; + +Note that these options are only available when running in .NET Core (3.1, 5.0 or higher) + +## Option 2 +Configure it manually: ``` c# var settings = new WireMockServerSettings