aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/response.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/response.rs b/src/response.rs
index 547cf12..393e3b8 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -141,10 +141,15 @@ pub async fn default(
// Try to add an external stylesheet from the `CSS_EXTERNAL` environment
// variable.
if let Ok(css) = var("CSS_EXTERNAL") {
- html_context.push_str(&format!(
- "<link rel=\"stylesheet\" type=\"text/css\" href=\"{}\">",
- css
- ));
+ let stylesheets =
+ css.split(',').filter(|s| !s.is_empty()).collect::<Vec<_>>();
+
+ for stylesheet in stylesheets {
+ html_context.push_str(&format!(
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"{}\">",
+ stylesheet,
+ ));
+ }
}
// Try to add an external favicon from the `FAVICON_EXTERNAL` environment