vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Render images and 3D models in the browser views
3b2bcc30534f24b4628b6365e69dcb9065115065 · Keenan Nemetz · 13d ago · parent 87bab8e1
Render images and 3D models in the browser views A blob whose name is an image is served as that image, so the <img> a README already emitted works and the source view can show it. An SVG keeps its source view and previews on request. The instance introduction resolves assets/, so a landing-page picture is no longer a broken link. A changed image or model shows both sides in the commit, compare, and change request diffs, where git only says "binary". The 3D viewer is a vendored three.js bundle, loaded only when a page has a model, with a download fallback for a reader without JavaScript or WebGL. closes: 01M7XQ9AKKKFNEX0F679JRRYQD
server/web/transport_test.go +5−1
| @@ -107,7 +107,11 @@ func TestSecurityHeadersCloseTheSurface(t *testing.T) { | |||
| 107 | 107 | w.securityHeaders(rw, httptest.NewRequest("GET", "https://forge.example.com/", nil)) | |
| 108 | 108 | ||
| 109 | 109 | csp := rw.Header().Get("Content-Security-Policy") | |
| 110 | for _, want := range []string{"script-src 'self'", "style-src 'self'", "object-src 'none'", "base-uri 'none'"} { | ||
| 110 | for _, want := range []string{ | ||
| 111 | "script-src 'self'", "style-src 'self'", "object-src 'none'", "base-uri 'none'", | ||
| 112 | // The model viewer decodes an embedded texture from a blob it created. | ||
| 113 | "img-src 'self' data: blob:", "connect-src 'self' blob:", | ||
| 114 | } { | ||
| 111 | 115 | if !strings.Contains(csp, want) { | |
| 112 | 116 | t.Fatalf("CSP is missing %q: %s", want, csp) | |
| 113 | 117 | } | |