New option for Github API token

Hello,

While automating my Vaultwarden and web-vault updates, I seem to have understood that in the diagnostics page the “Server Latest” and “Web Latest” values are retrieved via the Github API.

It would seem that the number of unauthenticated requests is limited to ~60/h/IP, which is a reasonable limit for a typical application. But if we’re making other requests to the Github API from the same IP address, it would be nice to be able to specify an API key in the Vaultwarden options for API requests sent to Github.

Here is an authenticated example with curl :

curl -s "https://api.github.com/repos/dani-garcia/vaultwarden/branches/main" -H "Authorization: token [TOKEN_VALUE]" | jq -r .commit.sha | cut -c -8

To create the token :

  • On Github, go to settings
  • Developer settings on the left
  • Personal access => Tokens (classic)
  • Create a new token (classic) without expiration and without checking any boxes.

Have a nice day and sorry for my English ! :smiley: