Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't verify CSRF token authenticity #915

Closed
WebEnd opened this issue Oct 3, 2016 · 2 comments
Closed

Can't verify CSRF token authenticity #915

WebEnd opened this issue Oct 3, 2016 · 2 comments

Comments

@WebEnd
Copy link

WebEnd commented Oct 3, 2016

Hi,

I use GitLab in a docker container that sits behind a nginx proxy

I get the following error when redirecting from SAML authentication
Started POST "/git/users/auth/saml/callback" for IP at 2016-10-03 13:28:35 +0000
Processing by OmniauthCallbacksController#failure as HTML
Parameters: {"SAMLResponse"=>"......................"}
Can't verify CSRF token authenticity

I have added GITLAB_HTTPS=true to the env
And the following to my nginx server:
location /git/ {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Protocol https;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://hstgitlab/git/;
}

Can you please let me know if I have setup something wrong?
It seems like there is a setting that could help
nginx[‘listen_https’] = false
but I have no idea how to set this up.

Any help would be greatly appreciated

@mrusme
Copy link

mrusme commented Oct 22, 2016

@WebEnd this should solve your issue: https://gist.github.com/sameersbn/becd1c976c3dc4866ef8

@WebEnd
Copy link
Author

WebEnd commented Nov 20, 2016

great ;)

@WebEnd WebEnd closed this as completed Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants