* Added translation using Weblate (Japanese)
* Translated using Weblate (Japanese)
Currently translated at 15.8% (47 of 297 strings)
Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/ja/
* Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (297 of 297 strings)
Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/zh_Hans/
---------
Co-authored-by: YoshichikaAAA <isthisyourpen@gmail.com>
Co-authored-by: Ricky <1173024819@qq.com>
Due to the fact the file templates/base/base_header.html contains a
<base> element, all relative URLs are interpreted as dependant on the
base.[1]
I've noticed the base isn't the current page, but the element linking to
anchor identifier isn't using the complete URL to the gist page, which
means that if you go to a gist, and try to click on the link that leads
you to the file (which would make browsers automatically go down if it's
a file that has a lot of lines), you get taken to the homepage, and
unless you look at the URL closely you wouldn't notice the
fragment/anchor part.
I'm sure there's a better way of dealing with this, such as removing
<base> from the template mentioned above, but due to the fact I'd like
to have this work, I've made it put the full URL to this page.
Something that might be good to do is making the relative URLs always be
absolute, by having the '{{ $.c.ExternalUrl }}' thing everywhere where a
relative URL would be, as that'd probably fix#415, and would allow for
this commit to be reverted if that's desired.
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
* Update util.go
Fix garbled/mojibake text display issues for non-English Unicode characters in browsers.
* add Content-Disposition, help handle file name on download
Author: awkj <hzzbiu@gmail.com>
* feat: add Prometheus metrics
* setup metrics using Prometheus client under /metrics endpoint
* add configuration value for metrics
* configure Prometheus middleware for generic metrics
* provide metrics for totals of users, gists and SSH keys
* modify test request to optionally return the response
* provide integration test for Prometheus metrics
* update documentation
* chore: make fmt
* Skip CSRF for embeds
The CSRF middleware sets a _csrf cookie also for loading the embed
javascript on third-party sites. With this change no _csrf cookie is set
when loading the embed javascript (regardless if third-party site or
first-party).
* Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (281 of 281 strings)
Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/zh_Hans/
* Translated using Weblate (Polish)
Currently translated at 100.0% (281 of 281 strings)
Translation: Opengist/Opengist
Translate-URL: http://tr.opengist.io/projects/_/opengist/pl/
---------
Co-authored-by: GabrielxD <gabrielxduo@outlook.com>
Co-authored-by: GGORG <GGORG0@protonmail.com>