Getting InsecureSecretKey error on release build #2528
-
This is very likely user error but trying out my project on a test server with the release build, I'm getting an I've generated my secret key as instructed on the help pages with My
This worked on v4 (but with Any ideas what I'm doing wrong? Thanks, Bas |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
One thing I was wondering about is that a |
Beta Was this translation helpful? Give feedback.
-
If you're using the default config provider, then that suffices. You just need to make sure that the Rocket.toml file is in the CWD or a parent of where you are |
Beta Was this translation helpful? Give feedback.
Ok I figured it out, kind off, and the problem isn't Rocket but it is docker. And it turns out it has been broken for years, it is just that v4 was happy to generate a secret key if none was provided in production (not a complaint, I agree v5 this loophole has been closed).
So we deploy our solution to our servers through docker, the docker image has default configuration files that shouldn't work in production. On the servers we have the proper configuration file for that server and when deploying the image we mount those files.
It was mounting our config file, but it wasn't mounting the rocket one. It just silently failed.
I think the cause is because mounting files isn't really support…