mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-24 18:04:58 +08:00
![]() The main metadata endpoint is available at the root "/" path, for JSON compatible media types. This endpoint is often requested by CLI and IDEs. Initializr is setting HTTP response headers to tell clients to cache the response body. With this current situation, several HTTP caching issues can happen. 1. Since many formats are available at the same path, proxies can cache the response body and redistribute it to many clients, even if they don't request the same media type. To fix that, we need to add a `Vary: Accept` response header; with that, proxies will cache responses but take into account that different Accept request headers might yield different responses. 2. Browsers have very specific caching implementations, and exposing that metadata endpoint on "/" and at the same time an HTML page will create issues related to HTTP caching. Navigation and refreshes might result with strange problems. To fix that, we need to reinstate the `/metadata/client` endpoint as a first class citizen (and not just a redirect). This way, Web UIs can freely use that path to request the metadata, without risking caching issues. See gh-914 |
||
---|---|---|
.. | ||
src | ||
pom.xml |