index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2019-12-23 23:55:55.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2019-12-23 23:55:55.0 +00:00:00
commit
1d2c1b3d3a12ed729a9d757f9a45298130d2ff98 [patch]
tree
42eb7b419c42006ae994d3c7c9806ca4f5d28fc8
parent
11515105dd4bd7f81edec2faf1d3b813cbe12ae1
download
1d2c1b3d3a12ed729a9d757f9a45298130d2ff98.tar.gz

feat: add error page options



Diff

 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,
}