conflicting headers #46

Open
opened 2025-09-26 19:59:10 +00:00 by Brooke · 1 comment
Owner

So, I've had some more time to review the previous issue on the traefik recipe #58. I was able to resolve the issue by removing the following lines from the compose.yml file. I'm not sure how this effects gitea as I do not have a deployment to test it on. The default way that forgejo seems to reply to requests is with the vary headers Access-Control-Request-Method and Access-Control-Request-Headers which seems to work with the way that SveltiaCMS authenticates.

removed from compose.yml

        - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
        - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}"
        - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100"
        - "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true"
So, I've had some more time to review the previous issue on the traefik recipe [#58](https://git.coopcloud.tech/coop-cloud/traefik/issues/58). I was able to resolve the issue by removing the following lines from the compose.yml file. I'm not sure how this effects gitea as I do not have a deployment to test it on. The default way that forgejo seems to reply to requests is with the vary headers `Access-Control-Request-Method` and `Access-Control-Request-Headers` which seems to work with the way that SveltiaCMS authenticates. removed from compose.yml ``` - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true" ```

#68 drops the traefik _cors labels and lets Gitea's [cors] section do it, roughly what you ended up doing by hand. forgejo has the same labels so that'll be a separate PR once this lands. Curious whether it works with Sveltia if you get a chance to try it.

#68 drops the traefik `_cors` labels and lets Gitea's `[cors]` section do it, roughly what you ended up doing by hand. forgejo has the same labels so that'll be a separate PR once this lands. Curious whether it works with Sveltia if you get a chance to try it.
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#46