32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
|
|
# Custom "public" assets served at the site root by Forgejo.
|
||
|
|
#
|
||
|
|
# GITEA_CUSTOM in the image is /data/gitea, so Forgejo serves
|
||
|
|
# /data/gitea/public/* at the root path. Mounting this ConfigMap there makes
|
||
|
|
# /robots.txt declarative instead of a hand-written file on the PVC
|
||
|
|
# (docs: forgejo.org/docs/latest/admin/advanced/search-engines-indexation).
|
||
|
|
#
|
||
|
|
# Why: self-registration was open until 2026-11-20 and spam profiles
|
||
|
|
# (/leonabrewton8, /charlinebrando, .../-/packages) were indexed by Google.
|
||
|
|
# The accounts are gone, but Forgejo's built-in robots.txt only disallows
|
||
|
|
# /explore/*?* (query strings) and /user/, leaving /explore/repos and
|
||
|
|
# /search crawlable. This keeps the owner's portfolio repos (/sirius/*)
|
||
|
|
# indexable and everything else out.
|
||
|
|
apiVersion: v1
|
||
|
|
kind: ConfigMap
|
||
|
|
metadata:
|
||
|
|
name: forgejo-custom-public
|
||
|
|
namespace: forgejo
|
||
|
|
data:
|
||
|
|
robots.txt: |
|
||
|
|
# forgejo.siriusdevops.com
|
||
|
|
User-agent: *
|
||
|
|
Disallow: /explore/*
|
||
|
|
Disallow: /user/*
|
||
|
|
Disallow: /search*
|
||
|
|
Disallow: /api/*
|
||
|
|
Disallow: /*/-/packages
|
||
|
|
Disallow: /repo/create
|
||
|
|
Disallow: /repo/migrate
|
||
|
|
Disallow: /org/create
|
||
|
|
|
||
|
|
Allow: /sirius/*
|