Add new endpoint to generate SVG badges
In order for users to add Software Heritage SVG badges in README files to indicate their code is archived, a new endpoint should be added to the web application to generate them.
This endpoint could have the following url: /badge/(object_type)/(object_id)/
where object_type
will be one of content, directory, origin, release, revision, snapshot
and object_id
the associated identifier (either an url or a sha1).
That new endpoint should also adds Cross-Origin Resource Sharing (CORS) headers to responses in order for the badges to be accessed on other domains (for instance from https://github.com). Hopefully, we can use django-cors-headers to easily do that.
Migrated from T2090 (view on Phabricator)