Replies: 1 comment 1 reply
-
If it will work for your use case, just load the plugin again after you know what the secret is, before freezing the application: # Initially with bogus secret
plugin :sessions, key: '_karafka_session', secret: 'a' * 64
# later with actual secret, before freezing application
Karafka::Web::Ui::Base.plugin :sessions, secret: 'b' * 64 Like most Roda plugins that accept options, you can load the sessions plugin multiple times and have the new options merged into the previous options. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use Roda in a gem (karafka-web) and I want my own configuration flow to be able to setup the sessions plugin secret. Is there a way?
At the moment I have to:
which runs when I load the code.
I would love to be able to do something like:
or any other way where I could alter the secret from a configuration I built after loading Roda app with its code but before starting it.
Is there a way?
Beta Was this translation helpful? Give feedback.
All reactions