Load values from Rocket.toml into managed state #74
Reference in New Issue
Block a user
No description provided.
Delete Branch "rocket_config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on discussion in issue #37, this PR moves the
standalone_modeanddisable_authparameters intoRocket.toml.Then, instead of reading the values from environment variables and using
lazy_staticto define global variables, we load them from the Rocket figment provider and add them to managed state.Managed state is rad because it can be accessed in routes and in request guards. We can easily extend the
RocketConfigstruct in the future to accommodate more config parameters. Since this seems to be "the Rocket way" of managing application state, I'm pretty happy about the change.I also changed
development->debugandproduction->releaseinRocket.toml. These profile names must have changed in Rocket somewhere along the way (I had been wondering whydisable_authwasn't taking effect like it should be...now it works as expected).CC: @notplants