diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr
index a64088a2..eeaf1be1 100644
--- a/src/invidious/views/channel.ecr
+++ b/src/invidious/views/channel.ecr
@@ -3,6 +3,7 @@
author = HTML.escape(channel.author)
channel_profile_pic = URI.parse(channel.author_thumbnail).request_target
host = env.request.headers["Host"]
+ scheme = env.request.headers["X-Forwarded-Proto"]? || ("https" if CONFIG.https_only) || "http"
relative_url =
case selected_tab
@@ -32,15 +33,15 @@
<%- if selected_tab.videos? -%>
-
+
-
+
-
+
-
+
<%- end -%>
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 966021dc..ca973f15 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -2,31 +2,32 @@
<% title = HTML.escape(video.title) %>
<% author = HTML.escape(video.author) %>
<% host = env.request.headers["Host"] %>
+<% scheme = env.request.headers["X-Forwarded-Proto"]? || ("https" if CONFIG.https_only) || "http" %>
<% content_for "header" do %>
-
+
">
-
+
-
+
-
+
-
+
-
-
+
+