std1.0.0-beta-7 SafeC docs

std :: http::static_files

Struct std::StaticOptions

#include <std/http/static_files.h> source

struct StaticOptions {
    int etag;
    int last_modified;
    int ranges;
    long long max_age;
    int index_html;
    int spa_fallback;
    int dotfiles;
}

Fields

§int etagsource

send ETag and honor If-None-Match (default 1)

§int last_modifiedsource

send Last-Modified, honor If-Modified-Since (default 1)

§int rangessource

honor Range (default 1)

§long long max_agesource

Cache-Control: max-age=N; -1 = no header (default -1)

§int index_htmlsource

a directory serves its index.html (default 1)

§int spa_fallbacksource

a missing path serves the root's index.html (default 0)

§int dotfilessource

serve names starting with '.' (default 0: 404)

Methods

§static struct StaticOptions defaults()source · definition