mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add full path redirect
This commit is contained in:
parent
2596410b97
commit
84fc87229c
1 changed files with 2 additions and 1 deletions
|
@ -343,7 +343,8 @@ if Kemal.config.ssl && redirect
|
|||
spawn do
|
||||
server = HTTP::Server.new("0.0.0.0", 80) do |context|
|
||||
context.response.headers.add "Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload"
|
||||
context.response.headers.add "Location", "https://#{context.request.headers["Host"]}"
|
||||
redirect_url = "https://#{context.request.host}#{context.request.path}?#{context.request.query}"
|
||||
context.response.headers.add "Location", redirect_url
|
||||
context.response.status_code = 302
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue