Article media directory, styling
This commit is contained in:
1 parent
1d67f611fc
commit
0ec13b8dc7
4 files changed
+22
-2
No files matched your search
@@ -25,9 +25,11 @@ pub struct Config {
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
concurrency_limit: usize,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
static_dir: PathBuf,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
posts_dir: PathBuf,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
static_dir: PathBuf,
|
||||
post_media_dir: PathBuf,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
namespace_uuid: uuid::Uuid,
|
||||
#[knuffel(child)]
|
||||
|
||||
@@ -39,6 +39,7 @@ pub fn service(
|
||||
.route("/articles", get(posts_list::handle))
|
||||
.route("/articles/:post_id", get(post::handle))
|
||||
.nest("/static", static_content::service(&config.static_dir))
|
||||
.nest("/article_media", static_content::service(&config.post_media_dir))
|
||||
.fallback(handle_fallback.into_service())
|
||||
.layer(ConcurrencyLimitLayer::new(config.concurrency_limit))
|
||||
.layer(TraceLayer::new_for_http())
|
||||
|
||||
Reference in new issue
Block a user