Cannot enable CORS in config #59

Open
opened 2026-06-18 17:09:00 +00:00 by Markintosh128k · 1 comment

Hi,

I'm trying to host a Hugo site for my organization. I'm trying to enable Decap CMS with login via Gitea, but I'm facing a CORS issue ("TypeError: Failed to fetch" after Gitea authorization).

I tried to enable CORS by adding environment variables (GITEA__cors__ENABLED=true / GITEA__cors__ALLOW_DOMAIN=https://example.org) both via abra app config and forcing them via docker service update, but it didn't work.

I also looked for the app.ini file inside the volumes to add the settings manually, but since it's the gitea/gitea:1.24.2-rootless image, /etc/gitea/app.ini inside the container appears empty/read-only and it's not mapped in the standard _data volume paths.

How can I properly inject the [cors] settings into this specific Co-op Cloud Gitea recipe?

Thanks!

Hi, I'm trying to host a Hugo site for my organization. I'm trying to enable Decap CMS with login via Gitea, but I'm facing a CORS issue ("TypeError: Failed to fetch" after Gitea authorization). I tried to enable CORS by adding environment variables (GITEA__cors__ENABLED=true / GITEA__cors__ALLOW_DOMAIN=https://example.org) both via abra app config and forcing them via docker service update, but it didn't work. I also looked for the app.ini file inside the volumes to add the settings manually, but since it's the gitea/gitea:1.24.2-rootless image, /etc/gitea/app.ini inside the container appears empty/read-only and it's not mapped in the standard _data volume paths. How can I properly inject the [cors] settings into this specific Co-op Cloud Gitea recipe? Thanks!
Owner

@Markintosh128k if you literally set GITEA_CORS_ALLOW_DOMAIN=https://example.org, then it might be worth trying GITEA_CORS_ALLOW_DOMAIN=example.org (without the https://); the protocol is added by the recipe config: https://git.coopcloud.tech/coop-cloud/gitea/src/branch/master/compose.yml#L87

@Markintosh128k if you literally set `GITEA_CORS_ALLOW_DOMAIN=https://example.org`, then it might be worth trying `GITEA_CORS_ALLOW_DOMAIN=example.org` (without the `https://`); the protocol is added by the recipe config: https://git.coopcloud.tech/coop-cloud/gitea/src/branch/master/compose.yml#L87
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/gitea#59