From cf07b66c127bf051ed535df9872a8797cf295e9a Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 9 Mar 2018 14:11:30 -0600 Subject: [PATCH] Use 301 for HTTP redirect --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index efa2a96c..70c4a3f0 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -345,7 +345,7 @@ if Kemal.config.ssl && redirect context.response.headers.add "Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload" redirect_url = "https://#{context.request.host}#{context.request.path}?#{context.request.query}" context.response.headers.add "Location", redirect_url - context.response.status_code = 302 + context.response.status_code = 301 end server.listen