use actix_files::Files only in debug mode

This commit is contained in:
jb-alvarado 2024-09-09 21:12:38 +02:00
parent 81c132cf66
commit fc560c774d

View File

@ -7,11 +7,12 @@ use std::{
thread, thread,
}; };
use actix_files::Files;
use actix_web::{middleware::Logger, web, App, HttpServer}; use actix_web::{middleware::Logger, web, App, HttpServer};
use actix_web_httpauth::middleware::HttpAuthentication; use actix_web_httpauth::middleware::HttpAuthentication;
#[cfg(any(debug_assertions, not(feature = "embed_frontend")))]
use actix_files::Files;
#[cfg(all(not(debug_assertions), feature = "embed_frontend"))] #[cfg(all(not(debug_assertions), feature = "embed_frontend"))]
use actix_web_static_files::ResourceFiles; use actix_web_static_files::ResourceFiles;