From 1d2c1b3d3a12ed729a9d757f9a45298130d2ff98 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Tue, 24 Dec 2019 00:55:55 +0100 Subject: [PATCH] feat: add error page options --- src/config.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/config.rs b/src/config.rs index 24efe3e..4767a1a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,4 +17,18 @@ pub struct Options { #[structopt(long, default_value = "./assets", env = "SERVER_ASSETS")] /// Assets directory path for add cache headers functionality pub assets: String, + #[structopt( + long, + default_value = "./public/50x.html", + env = "SERVER_ERROR_PAGE_50X" + )] + /// HTML file content for 50x errors + pub page50x: String, + #[structopt( + long, + default_value = "./public/404.html", + env = "SERVER_ERROR_PAGE_404" + )] + /// HTML file content for 404 errors + pub page404: String, } -- libgit2 1.7.2