Allow requests to end in a file extension
The response returned from the /image
endpoint is a PNG file, but the request URL doesn't include a file extension (e.g. /image/0
). For some use-cases, being able to request the image via a URL like /image/0.png
would help the client system understand that it's an image. Same thing with /trait
results being JSON-formatted. But currently if you request /image/0.png
, it returns a 404 error (as "0.png" is not a valid MoonCat identifier).
- Update the logic for
/image
,/glow-image
,/regular-image
, and/accessory-image
to allow a suffix of.png
to be added to the request URL - Update the logic for
/trait
,/accessory
, and/contract-details
to allow a suffix of.json
to be added to the request URL