aboutsummaryrefslogtreecommitdiffstats
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorboastful-squirrel <boastful.squirrel@gmail.com>2019-05-02 19:36:47 +0000
committerboastful-squirrel <boastful.squirrel@gmail.com>2019-05-02 19:36:47 +0000
commitdd8d11c698435217c370b940b41d060a614892c1 (patch)
tree56061af9f8ecf6324f98de49cd898cdcf40bd48f /src/renderer.rs
parentCargo fmt (diff)
downloadminiserve-dd8d11c698435217c370b940b41d060a614892c1.tar.gz
miniserve-dd8d11c698435217c370b940b41d060a614892c1.zip
Read query params to handle error back link
Diffstat (limited to '')
-rw-r--r--src/renderer.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index acef208..cdcec94 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -854,6 +854,7 @@ pub fn render_error(
color_scheme: ColorScheme,
default_color_scheme: ColorScheme,
has_referer: bool,
+ display_back_link: bool,
) -> Markup {
let link = if has_referer {
return_address.to_string()
@@ -875,9 +876,11 @@ pub fn render_error(
@for error in error_description.lines() {
p { (error) }
}
- div.error-nav {
- a.error-back href=(link) {
- "Go back to file listing"
+ @if display_back_link {
+ div.error-nav {
+ a.error-back href=(link) {
+ "Go back to file listing"
+ }
}
}
}