From 314b732b4ccf979934c8847dfbdb93f45d4dfa2c Mon Sep 17 00:00:00 2001 From: Ellie Re'em Date: Fri, 25 Oct 2024 12:20:26 +0200 Subject: [PATCH 1/3] Add redis.rb and update maintenance page --- app/views/errors/internal_server_error.html.erb | 14 ++++++++++++-- config/initializers/redis.rb | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 config/initializers/redis.rb diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb index 5ca2735b..c4a8a92c 100644 --- a/app/views/errors/internal_server_error.html.erb +++ b/app/views/errors/internal_server_error.html.erb @@ -8,7 +8,17 @@

- 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/redis.rb b/config/initializers/redis.rb new file mode 100644 index 00000000..0ad0e8c4 --- /dev/null +++ b/config/initializers/redis.rb @@ -0,0 +1 @@ +$redis = Redis.new(url: ENV['REDIS_URL'], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }) From 08f7d1e95252cbe01d341fa5ccb0fd321f87f4f8 Mon Sep 17 00:00:00 2001 From: Ellie Re'em Date: Fri, 25 Oct 2024 12:27:31 +0200 Subject: [PATCH 2/3] Make redis cache ssl no-verify --- config/initializers/redis.rb | 1 - config/initializers/storyblok_client.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 config/initializers/redis.rb diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb deleted file mode 100644 index 0ad0e8c4..00000000 --- a/config/initializers/redis.rb +++ /dev/null @@ -1 +0,0 @@ -$redis = Redis.new(url: ENV['REDIS_URL'], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }) 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' From 3dd5e3ef7e5fd73918b587b3ee6490f1f7ff04b4 Mon Sep 17 00:00:00 2001 From: Ellie Re'em Date: Fri, 25 Oct 2024 12:32:31 +0200 Subject: [PATCH 3/3] Fix linting issues --- app/views/errors/internal_server_error.html.erb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb index c4a8a92c..599a33fc 100644 --- a/app/views/errors/internal_server_error.html.erb +++ b/app/views/errors/internal_server_error.html.erb @@ -9,16 +9,13 @@

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

+ 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