Skip to content

CSRF verification failed. Request aborted #653

@thka-trifork

Description

@thka-trifork

Describe the issue

I have deployed weblate on a AKS cluster through the helm chart, together with nginx ingress controller and letsencrypt. So far everything works, the only thing is every POST command does not seem to work because of CSRF resulting in a error:

Permission Denied
CSRF verification failed. Request aborted.
CSRF failure reason: Origin checking failed - https://translate.dev.xyz.com does not match any trusted origins.

I have set the following parameters in the helm chart:

  • extraConfig.CSRF_TRUSTED_ORIGINS: "[https://translate.dev.xyz.com,http://translate.dev.xyz.com,https://.dev.xyz.com,https://.dev.xyz.com,https://translate.dev.xzy.com/accounts/login/azuread-tenant-oauth2/]"
  •     siteDomain: "translate.dev.xzy.com"
    
  •     allowedHosts: "translate.dev.xyz.com"
    

However nothing seems to get passed the CSRF verfication. Neither with azure authentication nor with plain password authentication.

Host and side-domain match from what I can see.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Deploy weblate on AKS with helm chart version 0.5.25
  2. go to login, try to login via azure or with username password

Expected behavior

There should not be CSFR error request and the login should return success on correct password

Screenshots

No response

Exception traceback

10.244.2.7 - - [15/Oct/2025:12:28:35 +0000] "GET /static/prism-weblatesearch.js?v=5.13.3 HTTP/1.1" 200 318 "https://translate.dev.xyz.com/" "useragent"
Forbidden (Origin checking failed - https://translate.dev.xyz.com does not match any trusted origins.): /accounts/login/

Additional context

Ingress configuration looks like:

ingress:
enabled: true
ingressClassName: nginx
hosts:
- host: translate.dev.xyz.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: weblate-tls
hosts:
- translate.dev.xyz.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixNobody will work on this.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions