module Xssmaze::Server

Defined in:

server.cr

Constant 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

Class Method Detail

def self.json_no_store(env) #

[View source]
def self.serve(env, entry : Catalog::Entry, last_modified : String) : String #

Render a cached Catalog::Entry with ETag/304 + gzip support.


[View source]
def self.start!(run_server : Bool = true) #

Wire up every "catalog" route plus the small handful of dynamic ones.


[View source]