about summary refs log tree commit diff
path: root/config/initializers/preload_link_headers.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-25 00:31:15 +0100
committerGitHub <noreply@github.com>2021-03-25 00:31:15 +0100
commita2a85d5ae03282c6f9cbf452b9b8f7d948a9f380 (patch)
treef3f15ea30de78e0fabaa5135a3b3c7b51053e4b6 /config/initializers/preload_link_headers.rb
parentd7c1c41859549212a6d34ad869fded16acc17b48 (diff)
parent5ea53b6158c42660aa61da2a49a3bbf9e2e406d0 (diff)
Merge pull request #1516 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/initializers/preload_link_headers.rb')
-rw-r--r--config/initializers/preload_link_headers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/preload_link_headers.rb b/config/initializers/preload_link_headers.rb
new file mode 100644
index 000000000..9f21c45ec
--- /dev/null
+++ b/config/initializers/preload_link_headers.rb
@@ -0,0 +1,8 @@
+# Since Rails 6.1, ActionView adds preload links for javascript files
+# in the Links header per default.
+
+# In our case, that will bloat headers too much and potentially cause
+# issues with reverse proxies. Furhermore, we don't need those links,
+# as we already output them as HTML link tags.
+
+Rails.application.config.action_view.preload_links_header = false