Emit warning about disabled session keys.

This commit is contained in:
Sergio Benitez 2016-12-22 01:29:58 -08:00
parent 7cf3cb6bc6
commit 595cc5be57
1 changed files with 8 additions and 1 deletions

View File

@ -308,7 +308,14 @@ impl Rocket {
White.paint(&config.address),
White.paint(&config.port));
info_!("logging: {:?}", White.paint(config.log_level));
info_!("session key: {}", White.paint(config.take_session_key().is_some()));
let session_key = config.take_session_key();
if session_key.is_some() {
info_!("session key: {}", White.paint("present"));
warn_!("Signing and encryption of cookies is currently disabled.");
warn_!("See https://github.com/SergioBenitez/Rocket/issues/20 for info.");
}
for (name, value) in config.extras() {
info_!("{} {}: {}", Yellow.paint("[extra]"), name, White.paint(value));
}