diff options
| author | knackebrot <knackebrot@tfwno.gf> | 2022-01-16 22:32:10 +0100 |
|---|---|---|
| committer | knackebrot <knackebrot@tfwno.gf> | 2022-02-10 02:07:12 +0100 |
| commit | 52c61bd06f6e3ef0130e7a2d0255feca777a7b3f (patch) | |
| tree | 5d93c55cc2d677c365db38b31d13f016f82fa788 /MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | |
| parent | bb7916767cd6ce6e609e4e33e7ff15d744cda2eb (diff) | |
Add option to change unix socket permissions
There is probably no way to do it when creating the socket
Diffstat (limited to 'MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index f9285c768..1fedf7205 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -50,6 +50,11 @@ namespace MediaBrowser.Controller.Extensions public const string UnixSocketPathKey = "kestrel:socketPath"; /// <summary> + /// The permissions for the unix socket. + /// </summary> + public const string UnixSocketPermissionsKey = "kestrel:socketPermissions"; + + /// <summary> /// Gets a value indicating whether the application should host static web content from the <see cref="IConfiguration"/>. /// </summary> /// <param name="configuration">The configuration to retrieve the value from.</param> @@ -97,5 +102,13 @@ namespace MediaBrowser.Controller.Extensions /// <returns>The unix socket path.</returns> public static string GetUnixSocketPath(this IConfiguration configuration) => configuration[UnixSocketPathKey]; + + /// <summary> + /// Gets the permissions for the unix socket from the <see cref="IConfiguration" />. + /// </summary> + /// <param name="configuration">The configuration to read the setting from.</param> + /// <returns>The unix socket permissions.</returns> + public static string GetUnixSocketPermissions(this IConfiguration configuration) + => configuration[UnixSocketPermissionsKey]; } } |
