From 6b00e4f2e6411d59256b1e9a7306321be8ff41b3 Mon Sep 17 00:00:00 2001 From: Arpita-Jaiswal Date: Wed, 8 Nov 2023 13:00:51 +0530 Subject: [PATCH] Fix: Code theme css was not applying on element --- fastn-core/src/commands/serve.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastn-core/src/commands/serve.rs b/fastn-core/src/commands/serve.rs index b3cac66e35..8c7aa25673 100644 --- a/fastn-core/src/commands/serve.rs +++ b/fastn-core/src/commands/serve.rs @@ -583,7 +583,7 @@ fn handle_default_route( let theme_css = ftd::theme_css(); return theme_css.get(theme).cloned().map(|theme| { actix_web::HttpResponse::Ok() - .content_type(mime_guess::mime::TEXT_JAVASCRIPT) + .content_type(mime_guess::mime::TEXT_CSS) .body(theme) }); } else if req.path().ends_with(fastn_core::utils::hashed_prism_js()) { @@ -595,7 +595,7 @@ fn handle_default_route( } else if req.path().ends_with(fastn_core::utils::hashed_prism_css()) { return Some( actix_web::HttpResponse::Ok() - .content_type(mime_guess::mime::TEXT_JAVASCRIPT) + .content_type(mime_guess::mime::TEXT_CSS) .body(ftd::prism_css()), ); }