mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-30 20:22:00 +00:00 
			
		
		
		
	Only add HTTP query if it exists
This commit is contained in:
		| @@ -343,7 +343,10 @@ 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" | ||||
|       redirect_url = "https://#{context.request.host}#{context.request.path}?#{context.request.query}" | ||||
|       redirect_url = "https://#{context.request.host}#{context.request.path}" | ||||
|       if context.request.query | ||||
|         redirect_url += "?#{context.request.query}" | ||||
|       end | ||||
|       context.response.headers.add "Location", redirect_url | ||||
|       context.response.status_code = 301 | ||||
|     end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Omar Roth
					Omar Roth