FEATURE: Cache CORS preflight for MessageBus (#14616)

FEATURE: Cache CORS preflight for MessageBus (#14616)

  • FEATURE: Cache CORS preflight for MessageBus

Followup for b301a6b for MessageBus

diff --git a/config/initializers/004-message_bus.rb b/config/initializers/004-message_bus.rb
index 2acc0e5..fcc62b3 100644
--- a/config/initializers/004-message_bus.rb
+++ b/config/initializers/004-message_bus.rb
@@ -30,7 +30,8 @@ def setup_message_bus_env(env)
     extra_headers = {
       "Access-Control-Allow-Origin" => Discourse.base_url_no_prefix,
       "Access-Control-Allow-Methods" => "GET, POST",
-      "Access-Control-Allow-Headers" => "X-SILENCE-LOGGER, X-Shared-Session-Key, Dont-Chunk, Discourse-Present"
+      "Access-Control-Allow-Headers" => "X-SILENCE-LOGGER, X-Shared-Session-Key, Dont-Chunk, Discourse-Present",
+      "Access-Control-Max-Age" => "7200",
     }
 
     user = nil

GitHub sha: 6ad76520b8e2fca0509f420ea4be8353f3b92c7b

This commit appears in #14616 which was approved by tgxworld. It was merged by Falco.