mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-24 17:19:51 +05:30
Add 'external_port'
This commit is contained in:
parent
79c1040796
commit
bc1e62ce51
@ -24,6 +24,7 @@ user: String,
|
|||||||
registration_enabled: {type: Bool, default: true},
|
registration_enabled: {type: Bool, default: true},
|
||||||
statistics_enabled: {type: Bool, default: false},
|
statistics_enabled: {type: Bool, default: false},
|
||||||
admins: {type: Array(String), default: [] of String},
|
admins: {type: Array(String), default: [] of String},
|
||||||
|
external_port: {type: Int32 | Nil, default: nil},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -195,6 +195,7 @@ end
|
|||||||
|
|
||||||
def make_host_url(config, kemal_config)
|
def make_host_url(config, kemal_config)
|
||||||
ssl = config.https_only || kemal_config.ssl
|
ssl = config.https_only || kemal_config.ssl
|
||||||
|
port = config.external_port || kemal_config.port
|
||||||
|
|
||||||
if ssl
|
if ssl
|
||||||
scheme = "https://"
|
scheme = "https://"
|
||||||
@ -202,7 +203,8 @@ def make_host_url(config, kemal_config)
|
|||||||
scheme = "http://"
|
scheme = "http://"
|
||||||
end
|
end
|
||||||
|
|
||||||
if kemal_config.port != 80 && kemal_config.port != 443
|
# Add if non-standard port
|
||||||
|
if port != 80 && port != 443
|
||||||
port = ":#{kemal_config.port}"
|
port = ":#{kemal_config.port}"
|
||||||
else
|
else
|
||||||
port = ""
|
port = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user