Updated Cors (markdown)

Stef Heyenrath
2022-01-12 19:13:00 +01:00
parent 9fda659ade
commit 1bed4106a7

16
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