Open
cgalo5758
wants to merge 1 commits from
wiki-cafe/gitea:cors-via-gitea into master
pull from: wiki-cafe/gitea:cors-via-gitea
merge into: :master
:master
:upgrade-mariadb-10.11.19
:main
:upgrade-28c01fd-rebased
:upgrade-28c01fd
:upgrade-2f64ddf
:master2
:lfs
:stop-first
:config-update
:renovate/configure
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
appletalk
arjan
basebuilder
BornDeleuze
Brooke
carla
cas (Cassowary)
codegod100
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
flancian
Frando
iexos
jade (Jade Ambrose)
javielico (Javielico)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
marlon (marlon)
mayel
mirsal
moosemower
moritz
nicksellen (Nick Sellen)
notplants
oxaliq (sorrel)
p4u1
pau
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
PhiNatalie
renovate-bot (Comrade Renovate Bot)
ripclap
rix
rscmbbng
sef (sef)
simon
sixsmith (Sixsmith)
stevensting
tobias
trav (Trav Fryer)
val (val (he/him))
vaznasty
virtualboys
wolcen (Chris Thompson)
wykwit
xynosis
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/gitea#68
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Moves CORS from the traefik middleware to Gitea's own
[cors]section.The traefik
_corslabels don't work here:https://${GITEA_CORS_ALLOW_DOMAIN}, so only one origin is possible. Comma- and space-separated values both fail. 3wc and I hit this in April 2025 with recipes.coopcloud.tech + wiki.cafe on git.coopcloud.tech.GITEA__cors__*env vars can't fix it: app.ini is a docker config rendered from app.ini.tmpl and mounted read-only, and the recipe replaces docker-setup.sh, so the image's env-to-ini step never runs.Changes: render
[cors]whenGITEA_CORS_ALLOW_DOMAINis set, drop the_corslabels from compose.yml and compose.anubis.yml, bump APP_INI_VERSION to v24, document the variable in .env.sample and README.Breaking: the value now needs the scheme, comma-separated for multiple, e.g.
GITEA_CORS_ALLOW_DOMAIN=https://recipes.coopcloud.tech,https://wiki.cafe. Gitea's ALLOW_DOMAIN is an origin list, so entries have to be full origins.Tested the template with the variable set and unset (block toggles), and checked 1.27.3: with
[cors]on, the API router allowsAuthorizationplus the full method set, and/login/oauth/access_tokenanswers its own OPTIONS.forgejo has the same labels; separate PR once this lands.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.