Skip to content

Feature Request: add CORS API indicating 'gitea' #16563

Closed
@coolaj86

Description

@coolaj86

TL;DR

I'd like there to be some way to indicate that the service is gitea, as opposed to gitlab.

Example

I'd like to be able to do something like this:

await fetch('https://try.gitea.io/api/v1/version', { mode: 'cors' }).toJSON()
// { "name": "gitea", "version": "1.15.0" }

Or similar to this:

await fetch('https://try.gitea.io/.well-known/openid-configuration', { mode: 'cors' }).toJSON()
// { "service_documentation": "https://docs.gitea.io" }

Just something that reveals "yes, this is gitea".

Rationalé

The reason is that I'm building a tool Bliss, which works with GitHub, GitLab, and Gitea and I'd like to be able to detect which system a user-supplied URL represents, since they have slightly different APIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions