From 53dc53580ceccde4ffd7794b31e1f9deb746f840 Mon Sep 17 00:00:00 2001 From: eleanorreem Date: Fri, 25 Oct 2024 12:37:00 +0200 Subject: [PATCH] Redis cache ssl fix & maintenance page (#484) * Add redis.rb and update maintenance page * Make redis cache ssl no-verify * Fix linting issues --- app/views/errors/internal_server_error.html.erb | 9 ++++++++- config/initializers/storyblok_client.rb | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb index 5ca2735b..599a33fc 100644 --- a/app/views/errors/internal_server_error.html.erb +++ b/app/views/errors/internal_server_error.html.erb @@ -8,7 +8,14 @@

- It might take a while but we will be back soon! In the meantime, head back to the Soulmedicine Homepage or to the Chayn Homepage if you feel this is an error let us know at team at soulmedicine.io + It might take a while but we will be back soon! + In the meantime, head back to the Soulmedicine Homepage. + If that doesn't work and for further resources, please head to our other resources:

+
    +
  1. Chayn's Main Site for a full list of resources
  2. +
  3. Bloom for free multi-lingual support on your healing journey
  4. +
+

If you feel this is an error let us know at team at chayn.co

diff --git a/config/initializers/storyblok_client.rb b/config/initializers/storyblok_client.rb index 47d16783..11badacd 100644 --- a/config/initializers/storyblok_client.rb +++ b/config/initializers/storyblok_client.rb @@ -11,10 +11,10 @@ if ENV['CONTENT_PREVIEW_MODE'] != 'true' redis_cache_url = ENV.fetch('REDIS_CACHE_URL') { raise 'REDIS_CACHE_URL missing' } - redis = Redis.new url: redis_cache_url + redis = Redis.new url: redis_cache_url, ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } ttl = ENV.fetch('CONTENT_CACHE_TTL_MINS', 60).to_i * 60 - cache = Storyblok::Cache::Redis.new redis: redis, ttl: ttl + cache = Storyblok::Cache::Redis.new redis: redis, ttl: ttl, ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } given_configuration[:cache] = cache given_configuration[:version] = 'published'