* add MIME types `application/zip` and `application/gzip` to anchors of automatically generated archives. * add testing for that, and also for https://codeberg.org/forgejo/forgejo/pulls/2899 ## Why Many instances are struggling with crawlers that are fetching these links, causing archives to be generated. The content is actually never downloaded. [MDN describes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type) this attribute as a "hint". So this hint can help a client to decide against fetching the href contents. I don't believe this change will actually improve the situation, however, I think this attribute is nice to have. ## MIME types It was a bit difficult to determine which are the right ones for this use case. [IANA lists](https://www.iana.org/assignments/media-types/media-types.xhtml) both `application/zip` and `application/gzip`. `application/zip` refers to [RFC6713](https://datatracker.ietf.org/doc/html/rfc6713) and `application/gzip` doesn't refer to an RFC directly. It also has [detailed information](https://www.iana.org/assignments/media-types/application/zip) about zip. [gzip is less detailed](https://www.iana.org/assignments/media-types/application/gzip). * [`application/zip`](https://www.iana.org/assignments/media-types/application/zip): > ZIP files are binary data and thus should be encoded for MIME mail transmission. This was written in 1993, but probably applies to the more modern web as well. * [`application/gzip`](https://datatracker.ietf.org/doc/rfc6713): > The 'application/gzip' media type describes a block of data that is compressed using gzip [RFC1952] compression. The data is a stream of bytes as described in RFC 1952. [RFC1952](https://datatracker.ietf.org/doc/rfc1952/) is a "GZIP file format specification", but there's a warning: "This RFC is not endorsed by the IETF and has no formal standing in the IETF standards process.". Anyway, I consider it as the right way to mark .tar.gz files too. Additional stuff that I read while researching: * https://stackoverflow.com/questions/2110269/add-mime-type-to-html-link Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6959 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org> |
||
---|---|---|
.devcontainer | ||
.forgejo | ||
assets | ||
build | ||
cmd | ||
contrib | ||
custom/conf | ||
docker | ||
models | ||
modules | ||
options | ||
public | ||
release-notes | ||
release-notes-published | ||
releases/images | ||
routers | ||
services | ||
templates | ||
tests | ||
tools | ||
web_src | ||
.air.toml | ||
.deadcode-out | ||
.dockerignore | ||
.editorconfig | ||
.envrc.example | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.gitpod.yml | ||
.golangci.yml | ||
.ignore | ||
.mailmap | ||
.markdownlint.yaml | ||
.npmrc | ||
.release-notes-assistant.yaml | ||
.spectral.yaml | ||
.yamllint.yaml | ||
BSDmakefile | ||
build.go | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
DCO | ||
Dockerfile | ||
Dockerfile.rootless | ||
eslint.config.mjs | ||
flake.lock | ||
flake.nix | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
Makefile | ||
package-lock.json | ||
package.json | ||
playwright.config.ts | ||
poetry.lock | ||
poetry.toml | ||
pyproject.toml | ||
README.md | ||
release-notes-assistant.sh | ||
RELEASE-NOTES.md | ||
renovate.json | ||
stylelint.config.js | ||
tailwind.config.js | ||
tsconfig.json | ||
vitest.config.ts | ||
webpack.config.js |
Welcome to Forgejo
Hi there! Tired of big platforms playing monopoly? Providing Git hosting for your project, friends, company or community? Forgejo (/for'd͡ʒe.jo/ inspired by forĝejo – the Esperanto word for forge) has you covered with its intuitive interface, light and easy hosting and a lot of builtin functionality.
Forgejo was created in 2022 because we think that the project should be owned by an independent community. If you second that, then Forgejo is for you! Our promise: Independent Free/Libre Software forever!
What does Forgejo offer?
If you like any of the following, Forgejo is literally meant for you:
- Lightweight: Forgejo can easily be hosted on nearly every machine. Running on a Raspberry? Small cloud instance? No problem!
- Project management: Besides Git hosting, Forgejo offers issues, pull requests, wikis, kanban boards and much more to coordinate with your team.
- Publishing: Have something to share? Use releases to host your software for download, or use the package registry to publish it for docker, npm and many other package managers.
- Customizable: Want to change your look? Change some settings? There are many config switches to make Forgejo work exactly like you want.
- Powerful: Organizations & team permissions, CI integration, Code Search, LDAP, OAuth and much more. If you have advanced needs, Forgejo has you covered.
- Privacy: From update checker to default settings: Forgejo is built to be privacy first for you and your crew.
- Federation: (WIP) We are actively working to connect software forges with each other through ActivityPub, and create a collaborative network of personal instances.
Learn more
Dive into the documentation, subscribe to releases and blog post on our website, find us on the Fediverse or hop into our Matrix room if you have any questions or want to get involved.
License
Forgejo is distributed under the terms of the GPL version 3.0 or any later version.
The agreement for this license was documented in June 2023 and implemented during the development of Forgejo v9.0. All Forgejo versions before v9.0 are distributed under the MIT license.
Get involved
If you are interested in making Forgejo better, either by reporting a bug or by changing the governance, please take a look at the contribution guide.