Skip to content
Discussion options

You must be logged in to vote

Here's what I'd recommend:

.service(
    actix_web::web::scope("/images")
        .default_service(
            actix_files::Files::new("", &CONFIG.images.dir).use_last_modified(true),
        )
        .wrap(DefaultHeaders::new()...),
)

It does feel natural to want to wrap the files service like this though, I should have a think about making it easier.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@154286
Comment options

Answer selected by robjtede

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants