CSRF token verification failed! with reverse proxy and HTTP type HTTPS

i installed it from packages.
latest versions 24.04.

Expected behavior:

I expect that when I set ‘HTTP type’ to https i will be able to login still.

Actual behavior:

I get the error CSRF token verification failed!

Steps to reproduce the behavior:

I am using certBot with a reverse proxy.

here is my conf:

    proxy_set_header Host $host;       # Preserve the original Host header
    proxy_set_header X-Real-IP $remote_addr;  # Preserve the client IP
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # Forward client IP in chain
    proxy_set_header X-Forwarded-Proto https;  # Preserve the scheme (http/https)
    proxy_set_header X-Forwarded-Host $host;  # Ensure correct Host header
    proxy_set_header X-Forward-Ssl on;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/support.exampleuk.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/support.exampleuk.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

when http type is http I can access the site through the internet on https just fine and it’s working great.

however, I can’t seem to add nextcloud intigration and I am pretty sure the reason being is that I am currently using ‘http type’ http but this is irelevant at the moment. I should be able to set the http type to https and still login.

if i turn it to https i can’t login.

ive tried clearing cookies to no avail.

I’ve solved the issue.

I had to add the lines outlined in the guide to the zammad conf. I thought everything was handled by the proxy nginx but i guess not.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.