module
Xssmaze::Server
Defined in:
server.crConstant Summary
-
STATIC_ROUTES =
[{path: "/", key: "index"}, {path: "/map/text", key: "map_text"}, {path: "/map/markdown", key: "map_md"}, {path: "/map/categories", key: "categories"}, {path: "/map/openapi", key: "openapi"}, {path: "/sitemap.xml", key: "sitemap"}, {path: "/version", key: "version"}, {path: "/stats", key: "stats"}, {path: "/payloads", key: "payloads"}, {path: "/robots.txt", key: "robots"}, {path: "/assets/index.css", key: "css"}, {path: "/assets/index.js", key: "js"}] -
Mapping of route path -> catalog key. Keep this table small and data-driven so adding a new catalog asset is a one-line change.
Class Method Summary
- .json_no_store(env)
-
.serve(env, entry : Catalog::Entry, last_modified : String) : String
Render a cached Catalog::Entry with ETag/304 + gzip support.
-
.start!(run_server : Bool = true)
Wire up every "catalog" route plus the small handful of dynamic ones.
Class Method Detail
def self.serve(env, entry : Catalog::Entry, last_modified : String) : String
#
Render a cached Catalog::Entry with ETag/304 + gzip support.
def self.start!(run_server : Bool = true)
#
Wire up every "catalog" route plus the small handful of dynamic ones.