potential issue with cors handling #58
Closed
opened 2025-09-10 03:23:38 +00:00 by Brooke
·
7 comments
No Branch/Tag Specified
master
renovate/traefik-3.x
adding-matrix-room
pgsql-port-open
access-log
anubis-metrics
forwarded-headers
trust-forward-header
large-uploads
anubis-log-level
compose.matrix
garage
chore-5.0.0+v3.6.10
feat-release-notes-next
add-onion-support
remove-default-timeout
feat-pull-request-template
improve-docs
anubis
sixsmith-v3-update-only
feature/irc
revert-logmaxAge
qbit
feature/v3
error-pages-again
metrics
basic-auth
error-messages-attempt
error-pages-attempt
minecraft
forward-auth-2
error-pages
rejig-compose-vars
self-signed
6.1.0+v3.7.10
6.0.0+v3.7.7
5.1.1+v3.6.15
5.1.0+v3.6.11
5.0.0+v3.6.10
4.0.0+v3.6.10
3.10.0+v3.6.7
3.9.0+v3.6.5
3.8.0+v3.6.5
3.7.0+v3.6.2
3.6.3+v3.4.5
3.6.2+v3.4.5
3.6.1+v3.4.5
3.6.0+v3.4.5
3.5.0+v3.4.5
3.4.2+v3.4.5
3.4.1+v3.4.5
3.4.0+v3.4.4
3.3.0+v2.11.26
3.2.0+v2.11.25
3.1.1+v2.11.25
3.1.0+v2.11.24
3.0.0+v2.11.22
2.10.0+v2.11.22
2.9.1+v2.11.14
3.1.0+v2.11.14
2.9.0+v2.11.14
2.8.0+v2.11.10
2.7.0+v2.11.8
3.0.0+v3.0.0
2.6.3+v2.11.2
2.6.2+v2.11.1
2.6.1+v2.11.0
2.6.0+v2.11.0
2.5.0+v2.11.0
2.4.3+v2.10.5
2.1.0+v2.9.9
2.4.2+v2.10.4
2.4.1+v2.10.3
2.4.0+v2.10.1
2.3.1+v2.10.2
2.3.0+v2.10.2
2.2.0+v2.10.2
2.2.0+v2.10.1
2.0.4+v2.9.6
2.0.3+v2.9.6
2.0.2+v2.9.5
2.0.0+v2.9.1
1.1.1+v2.8.1
1.1.0+v2.8.0
1.0.1+v2.5.6
1.0.0+v2.5.2
No labels
Milestone
No items
No Milestone
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
decentral1se (d1)
fauno (fauno)
javielico (Javielico)
jjsfunhouse
kawaiipunk (KawaiiPunk)
knoflook
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
renovate-bot (Comrade Renovate Bot)
simon
stevensting
trav (Trav Fryer)
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/traefik#58
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.
I'm attempting to use Stelvia CMS that authorizes with a Forgejo account using their oauth system. The CMS does authentication client side as it's made for static sites. Using a personal access token resolves as "failed to fetch" and seems to be related to how Traefik responds to the request:
potential issues with cors handlingto potential issue with cors handling@Brooke I ran into this with toolshed/recipes.coopcloud.tech – what worked for me was setting the (apparently undocumented 😳)
CORS_ALLOW_DOMAINsetting in the Gitea recipe.Basically yes Traefik seems to need this label to respond correctly to CORS requests:
Hm I tried setting that and I'm getting the same error, will test more in the morning tomorrow.
So far I've tested setting traefik labels and forgejo's cors environment variables to no avail. I found a related issue on the forgejo codeberg and that ended with just forcing nginx to send the right headers so it leads me to believe it's still something that can be solved with the right combination of traefik labels. Honestly I'm still too unfamiliar with traefik in general to know where I'm doing something wrong.
@Brooke I wonder if it was somehow that both the traefik label, and the Gitea setting, was required when I set it up before?
It appears to be still working here anyway:
What Forgejo variable did you set, and did you add it to
compose.forgejo.yml?Ah ok I think I don't totally understand how sveltiacms is handling this then. Because I do get the same result when I curl git.coopcloud.tech and fung.uy (my git instance). I eventually migrated the repo to codeberg, sveltia is no longer throwing an error. Sorry, I feel totally lost trying to learn how all this is supposed to work.
I ended up not actually having to change anything with traefik and just set the following variables in the forgejo config. I'm so lost here but I feel like I can potentially conclude this as either being a forgejo issue or sveltia issue but not related to traefik. So, maybe the issue should be moved.
Amazing! Yes, this is what I was expecting. Maybe you could add these in
compose.forgejo.ymlif you have a spare moment?moved #46