matrix-public-archive/server
Eric Eastwood 9b067f8637
Set `X-Date-Temporal-Context` header for easy cache rules (#209)
Set `X-Date-Temporal-Context: [past|present|future]` header for easy cache rules:

 - Cache `past` things heavily
 - Cache `present`/`future` things for 5 minutes
 
This accomplishes the goal we set out for:

> - We can cache all responses except for the latest UTC day (and anything in the future). ex. `/!aMzLHLvScQCGKDNqCB:gitter.im/date/2022/10/13`
>    - For the latest day, we could set the cache expire after 5 minutes or so
>
> *-- [Matrix Public Archive deployment issue](https://github.com/vector-im/sre-internal/issues/2079)*

And this way we don't have to do any fancy date parsing and comparison from the URL which is probably not even possible Cloudflare cache rules.
2023-05-04 13:42:59 -05:00
..
child-process-runner Timeout requests and stop processing further (#204) 2023-05-02 00:39:01 -05:00
hydrogen-render Timeout requests and stop processing further (#204) 2023-05-02 00:39:01 -05:00
lib Set `X-Date-Temporal-Context` header for easy cache rules (#209) 2023-05-04 13:42:59 -05:00
middleware Timeout requests and stop processing further (#204) 2023-05-02 00:39:01 -05:00
routes Set `X-Date-Temporal-Context` header for easy cache rules (#209) 2023-05-04 13:42:59 -05:00
tracing We can better detect static assets to avoid tracing nowadays (#207) 2023-05-02 00:55:22 -05:00
server.js Enable tracing by config so we can enable from argv, env variable, or config file (#41) 2022-07-14 11:26:53 -05:00
start-dev.js Timeout requests and stop processing further (#204) 2023-05-02 00:39:01 -05:00