Skip to content

Commit

Permalink
Redis cache ssl fix & maintenance page (#484)
Browse files Browse the repository at this point in the history
* Add redis.rb and update maintenance page

* Make redis cache ssl no-verify

* Fix linting issues
  • Loading branch information
eleanorreem authored Oct 25, 2024
1 parent 8a6b4c5 commit 53dc535
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion app/views/errors/internal_server_error.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
<div class="container-fluid col-text">
<div class="py-3 px-lg-5 col-12">
<p class="lead text-center">
It might take a while but we will be back soon! In the meantime, head back to the <a href="https://soulmedicine.io" target="_blank">Soulmedicine Homepage</a> or to the <a href="https://chayn.co" target="_blank">Chayn Homepage</a> if you feel this is an error let us know at <i>team at soulmedicine.io</i>
It might take a while but we will be back soon!
In the meantime, head back to the <a href="https://soulmedicine.io" target="_blank">Soulmedicine Homepage</a>.
If that doesn't work and for further resources, please head to our other resources:
</p>
<ol>
<li> <a href="https://chayn.co" target="_blank">Chayn's Main Site</a> for a full list of resources</li>
<li> <a href="https://chayn.co" target="_blank">Bloom</a> for free multi-lingual support on your healing journey</li>
</ol>
<p>If you feel this is an error let us know at <i>team at chayn.co</i></p>
</div>
</div>
4 changes: 2 additions & 2 deletions config/initializers/storyblok_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 53dc535

Please sign in to comment.