Content
You are here:
ubuntu 18.04 getting error 422 crsf after switching from https to http
Added by Jānis Roze almost 4 years ago
I am having problems. I had Openproject configured with ssl but then after my managment said they want to switch to http. I reconfigured Openproject to run without ssl. But now many systems but not all get the
[Error 422] Unable to verify Cross-Site Request Forgery token.
Maybe I am missing something. What would be all the steps from switching from https config to http?
Many thanks for your reply.
Replies (2)
Hi Jänis,
either your OpenProject or your external server is still terminating SSL or treating the request as HTTPS.
If OpenProject assumes the request is HTTPS, it will output cookies with a flag that prohibits them from being sent outside HTTPS. If your connection is now non-SSL, the cookie gets lost and you end up with the error you're seeing.
Please run
openproject reconfigure
and unset the SSL configuration. Then, ensure thatopenproject config
does not contain any of these:Also, test that the protocol is not https:
openproject run bundle exec rails runner "puts Setting.protocol"
should yield 'http'.Best
Oliver
Oliver Günther wrote:
Many thanks @Oliver for your response. Cannot overstate how greatful I am.
I did what you told me.
Here is the output:
But still I am experiencing the same error! The thing is weird:
PC1:
PC2(not connected to the system ever before):
It seems random thats why I cannot pinpoint the problem.