mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Upgrade to Crystal 0.25 and update signature
This commit is contained in:
parent
604ae665b6
commit
f5ea832721
3 changed files with 12 additions and 9 deletions
|
@ -1000,7 +1000,7 @@ end
|
|||
# Add redirect if SSL is enabled
|
||||
if Kemal.config.ssl
|
||||
spawn do
|
||||
server = HTTP::Server.new("0.0.0.0", 80) do |context|
|
||||
server = HTTP::Server.new do |context|
|
||||
redirect_url = "https://#{context.request.host}#{context.request.path}"
|
||||
if context.request.query
|
||||
redirect_url += "?#{context.request.query}"
|
||||
|
@ -1009,6 +1009,7 @@ if Kemal.config.ssl
|
|||
context.response.status_code = 301
|
||||
end
|
||||
|
||||
server.bind_tcp "0.0.0.0", 80
|
||||
server.listen
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue