diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-09-23 13:05:29 -0400 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-09-24 13:38:50 -0400 |
| commit | 8c2ddb02558afcf28345eb15ca9a5ec09b89e5f1 (patch) | |
| tree | 22b11415d0f518511f52920af7acf4b95b3bcabf | |
| parent | 466a5a932bcd38ebee0bfc75ca3a8f813252c562 (diff) | |
| download | invidious-8c2ddb02558afcf28345eb15ca9a5ec09b89e5f1.tar.gz invidious-8c2ddb02558afcf28345eb15ca9a5ec09b89e5f1.tar.bz2 invidious-8c2ddb02558afcf28345eb15ca9a5ec09b89e5f1.zip | |
Add config options for host binding and port
| -rw-r--r-- | src/invidious.cr | 2 | ||||
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index da1d9aa8..90a47efd 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -5324,4 +5324,6 @@ 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 diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 0ec117c1..615e62df 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -235,6 +235,8 @@ struct Config hsts: {type: Bool?, default: true}, # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely disable_proxy: {type: Bool? | Array(String)?, default: false}, # Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local' force_resolve: {type: Socket::Family, default: Socket::Family::UNSPEC, converter: FamilyConverter}, # Connect to YouTube over 'ipv6', 'ipv4'. Will sometimes resolve fix issues with rate-limiting (see https://github.com/ytdl-org/youtube-dl/issues/21729) + port: {type: Int32, default: 3000}, # Port to listen for connections (overrided by command line argument) + host_binding: {type: String, default: "0.0.0.0"}, # Host to bind (overrided by command line argument) }) end |
