Atlas modal: pose toggle + wiki descriptions
avian/api/cutout.php: read ?pose=N parameter. pose=1 (default) serves
<slug>.png, pose=2 serves <slug>-2.png, etc. Pose >1 missing falls
back to pose-1 instead of skipping to the photo cutout so the flight
tab still shows something recognisable. Pose clamped to 1-99 to
block path-traversal payloads.
avian/api/wiki.php (new): Wikipedia REST summary proxy. Returns
{extract, thumbnail, title}. Thumbnail host pinned to wikimedia.org/
wikipedia.org to block SSRF. Cached for 24h.
avian/frontend/apt.js: fetch wiki descriptions from ./avian/api/wiki.php
(was hitting the worker's /api/wiki.json which 404'd in our overlay).
This commit is contained in:
@@ -1856,7 +1856,7 @@
|
||||
// Wikipedia summary (description + genus / family).
|
||||
var loadWiki = WIKI_CACHE[sci]
|
||||
? Promise.resolve(WIKI_CACHE[sci])
|
||||
: fetchJson('/api/wiki.json?sci=' + encodeURIComponent(sci)).then(function (j) {
|
||||
: fetchJson('./avian/api/wiki.php?sci=' + encodeURIComponent(sci)).then(function (j) {
|
||||
WIKI_CACHE[sci] = j; return j;
|
||||
});
|
||||
loadWiki.then(function (j) {
|
||||
|
||||
Reference in New Issue
Block a user