mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-13 19:48:24 +00:00
add the ability to listen on unix sockets
This commit is contained in:
@@ -3917,6 +3917,15 @@ add_context_storage_type(Preferences)
|
||||
add_context_storage_type(User)
|
||||
|
||||
Kemal.config.logger = LOGGER
|
||||
Kemal.config.host_binding = Kemal.config.host_binding != "0.0.0.0" ? Kemal.config.host_binding : CONFIG.host_binding
|
||||
Kemal.config.port = Kemal.config.port != 3000 ? Kemal.config.port : CONFIG.port
|
||||
Kemal.run
|
||||
|
||||
Kemal.run do |config|
|
||||
if CONFIG.bind_unix
|
||||
if File.exists?(CONFIG.bind_unix.not_nil!)
|
||||
File.delete(CONFIG.bind_unix.not_nil!)
|
||||
end
|
||||
config.server.not_nil!.bind_unix CONFIG.bind_unix.not_nil!
|
||||
else
|
||||
config.host_binding = config.host_binding != "0.0.0.0" ? config.host_binding : CONFIG.host_binding
|
||||
config.port = config.port != 3000 ? config.port : CONFIG.port
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user