rename /privacy to /about since there is a user called privacy

このコミットが含まれているのは:
Arya Kiran 2023-03-10 15:38:11 +05:30
コミット 5a0e930224
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 842D12BDA50DF120
5個のファイルの変更19行の追加19行の削除

ファイルの表示

@ -10,7 +10,7 @@ import (
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "gothub", Use: "gothub",
Short: "An alternative front-end for GitHub.", Short: "An alternative front-end for GitHub.",
Long: `An alternative front-end for GitHub, written by Odyssey346 and Midou360.`, Long: `An alternative front-end for GitHub written in Go Fiber.`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
cmd.Help() cmd.Help()
}, },

ファイルの表示

@ -8,17 +8,18 @@ import (
) )
type PrivacyInfo struct { type PrivacyInfo struct {
IPAddr string IPAddr string
ReqURL string ReqURL string
UserAgent string UserAgentLogged string
Diagnostics string Diagnostics string
Country string Country string
Provider string Provider string
Cloudflare string Cloudflare string
PrivacyPolicy string PrivacyPolicy string
Version string Version string
GoVersion string GoVersion string
FiberVersion string FiberVersion string
UserAgent string
} }
func HandlePrivacy(c *fiber.Ctx) error { func HandlePrivacy(c *fiber.Ctx) error {

ファイルの表示

@ -98,7 +98,7 @@ func Serve() {
app.Static("/robots.txt", "./public/robots.txt", staticConfig) app.Static("/robots.txt", "./public/robots.txt", staticConfig)
app.Static("/favicon.ico", "./public/assets/favicon.ico", staticConfig) app.Static("/favicon.ico", "./public/assets/favicon.ico", staticConfig)
app.Static("/logo.svg", "./public/assets/logo.svg", staticConfig) app.Static("/logo.svg", "./public/assets/logo.svg", staticConfig)
app.Get("/privacy", pages.HandlePrivacy) app.Get("/about", pages.HandleAbout)
app.Get("/explore", ratelimiter, pages.HandleExplore) app.Get("/explore", ratelimiter, pages.HandleExplore)
app.Get("/:user", pages.HandleUser) app.Get("/:user", pages.HandleUser)
app.Get("/avatar/:id", func(c *fiber.Ctx) error { app.Get("/avatar/:id", func(c *fiber.Ctx) error {

ファイルの表示

@ -1,8 +1,9 @@
{{template "header" .}} {{template "header" .}}
<main> <main>
<h2>Instance Privacy</h2> <h2>About this GotHub instance</h2>
{{ if .privacyInformation}} {{ range $key, $value := .privacyInformation}} {{ if .privacyInformation}} {{ range $key, $value := .privacyInformation}}
<h3>Instance Privacy</h3>
<p> <p>
The goal of this page is to bring transparency to the data collected by the The goal of this page is to bring transparency to the data collected by the
instances and to encourage privacy friendly practices. instances and to encourage privacy friendly practices.
@ -11,7 +12,7 @@
<ul> <ul>
<li><b>IP Address logged:</b> {{.IPAddr}}</li> <li><b>IP Address logged:</b> {{.IPAddr}}</li>
<li><b>Request URL logged:</b> {{.ReqURL}}</li> <li><b>Request URL logged:</b> {{.ReqURL}}</li>
<li><b>User Agent logged:</b> {{.UserAgent}}</li> <li><b>User Agent logged:</b> {{.UserAgentLogged}}</li>
<li><b>Diagnostic Information logged:</b> {{.Diagnostics}}</li> <li><b>Diagnostic Information logged:</b> {{.Diagnostics}}</li>
</ul> </ul>
{{ if .PrivacyPolicy }} {{ if .PrivacyPolicy }}
@ -28,9 +29,7 @@
> >
</p> </p>
<ul> <ul>
<li> <li><b>Go Version</b>: Fiber {{ .FiberVersion}} running on {{ .GoVersion}}</li>
<b>Go Version</b>: Fiber {{ .FiberVersion}} running on {{ .GoVersion}}
</li>
<li><b>Country:</b> {{.Country}}</li> <li><b>Country:</b> {{.Country}}</li>
<li><b>Cloudflare:</b> {{.Cloudflare}}</li> <li><b>Cloudflare:</b> {{.Cloudflare}}</li>
<li><b>ISP:</b> {{.Provider}}</li> <li><b>ISP:</b> {{.Provider}}</li>

ファイルの表示

@ -24,7 +24,7 @@
> >
<div class="navbarLinks"> <div class="navbarLinks">
<a href="/explore">Explore</a> <a href="/explore">Explore</a>
<a href="/privacy">Privacy</a> <a href="/about">About</a>
<a href="https://codeberg.org/gothub/gothub">Source code</a> <a href="https://codeberg.org/gothub/gothub">Source code</a>
</div> </div>
</div> </div>