[backend/startup] Support unix sockets on FreeBSD

This commit is contained in:
Laura Hausmann 2024-02-16 05:02:00 +01:00
parent 31807c654d
commit 81e9c7e635
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -133,7 +133,7 @@ public static class WebApplicationExtensions {
var logger = app.Services.CreateScope().ServiceProvider.GetRequiredService<ILoggerFactory>() var logger = app.Services.CreateScope().ServiceProvider.GetRequiredService<ILoggerFactory>()
.CreateLogger("Microsoft.Hosting.Lifetime"); .CreateLogger("Microsoft.Hosting.Lifetime");
if (!OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS()) if (!OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS() && !OperatingSystem.IsFreeBSD())
throw new Exception("Can't set unix socket permissions on a non-UNIX system"); throw new Exception("Can't set unix socket permissions on a non-UNIX system");
var perms = "660"; var perms = "660";