Skip to content

Commit a0c4cfa

Browse files
committed
attempt to include localhost options
1 parent 4dd5847 commit a0c4cfa

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/featureflags/Program.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,9 @@
6060
if (allowedOrigins.Contains(origin))
6161
return true;
6262

63-
if (!builder.Environment.IsDevelopment())
64-
return false;
65-
6663
return Uri.TryCreate(origin, UriKind.Absolute, out var uri)
67-
&& (uri.Host == "localhost"
68-
|| uri.Host == "127.0.0.1"
69-
|| uri.Host == "::1")
70-
&& (uri.Scheme == Uri.UriSchemeHttp
71-
|| uri.Scheme == Uri.UriSchemeHttps);
64+
&& (uri.Host == "localhost" || uri.Host == "127.0.0.1")
65+
&& (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps);
7266
})
7367
.WithMethods("GET")
7468
.WithHeaders("user", "X-API-Key");

0 commit comments

Comments
 (0)