-
Paul Melnikow authored
1. Remove rasterization support from the server. This responsibility is delegated to a raster server which proxies the SVG badges and renders them. 2. When a raster server URL is configured, 301 redirect all .png badges to the identical URL on the raster server. `https://img.shields.io/npm/v/express.png?style=flat-square`
`https://raster.shields.io/npm/v/express.png?style=flat-square` 3. For configured redirects, redirect to the canonical URL on the raster server. `https://img.shields.io/vso/build/totodem/8cf3ec0e-d0c2-4fcd-8206-ad204f254a96/2.png?style=flat-square` `https://img.shields.io/azure-devops/build/totodem/8cf3ec0e-d0c2-4fcd-8206-ad204f254a96/2.png?style=flat-square` 4. Redirect the "legacy badge old version" to the appropriate URL on the raster server. 5. When no raster server is configured (e.g. PRs), render an SVG containing **404 | raster badges not available** for all `.png` badges. (Note that the raster server can be self-hosted; however, this is deferred to a later PR.) 5. Drop support for jpg and gif which are very infrequently used (see #3112). Render an SVG containing **410 | jpg no longer available**. 7. ~~Remove raster dependencies.~~ Remove the raster cache (which is only used in the CLI, and therefore pointless). 8. Move the LRUCache code out of the npm package. 8. A wee bit of refactoring in `server.js`. Ref #3112 Close #3631Paul Melnikow authored1. Remove rasterization support from the server. This responsibility is delegated to a raster server which proxies the SVG badges and renders them. 2. When a raster server URL is configured, 301 redirect all .png badges to the identical URL on the raster server. `https://img.shields.io/npm/v/express.png?style=flat-square`
`https://raster.shields.io/npm/v/express.png?style=flat-square` 3. For configured redirects, redirect to the canonical URL on the raster server. `https://img.shields.io/vso/build/totodem/8cf3ec0e-d0c2-4fcd-8206-ad204f254a96/2.png?style=flat-square` `https://img.shields.io/azure-devops/build/totodem/8cf3ec0e-d0c2-4fcd-8206-ad204f254a96/2.png?style=flat-square` 4. Redirect the "legacy badge old version" to the appropriate URL on the raster server. 5. When no raster server is configured (e.g. PRs), render an SVG containing **404 | raster badges not available** for all `.png` badges. (Note that the raster server can be self-hosted; however, this is deferred to a later PR.) 5. Drop support for jpg and gif which are very infrequently used (see #3112). Render an SVG containing **410 | jpg no longer available**. 7. ~~Remove raster dependencies.~~ Remove the raster cache (which is only used in the CLI, and therefore pointless). 8. Move the LRUCache code out of the npm package. 8. A wee bit of refactoring in `server.js`. Ref #3112 Close #3631