Jump to content

Nginx Reverse Proxy + Apache = CSRF Error when logging in on admin page


MonkeyTruffle

Recommended Posts

Hiya, I've managed to get cubecart working on Apache behind nginx apart from the admin bit. I cannot login because it always comes back with the CSRF error.

My nginx config is: 

location / {
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP  $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_pass_header X-CSRFToken;
proxy_pass_header       Set-Cookie;
proxy_pass https://127.0.0.1:8000/;
}

Has anyone managed to get it working using nginx and apache? I've been trying for hours and am at a total loss.

Thanks!

 

I'm sure, as per usual it'll be something simple

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...