Pass Gitea API token to requests
This allows to display repos that aren't fully public. Some users seem to be very interested in not having their pages viewable, and it might make even sense to avoid e.g. search engines to read them. If set to some random user string, this could allow to set the visibility at least to limited (so only logged users see the repo), and should allow to view private repos in the future with another API token.
This commit is contained in:
2
main.go
2
main.go
@ -39,6 +39,8 @@ var MainDomainSuffix = []byte("." + envOr("PAGES_DOMAIN", "codeberg.page"))
|
||||
// GiteaRoot specifies the root URL of the Gitea instance, without a trailing slash.
|
||||
var GiteaRoot = []byte(envOr("GITEA_ROOT", "https://codeberg.org"))
|
||||
|
||||
var GiteaApiToken = []byte(envOr("GITEA_API_TOKEN", ""))
|
||||
|
||||
//go:embed 404.html
|
||||
var NotFoundPage []byte
|
||||
|
||||
|
Reference in New Issue
Block a user