issue
Hi we self host a forum using Forem over AWS with Cloudflare as cdn. I just notice that user cannot edit his comment without refresh the page.
in this example, no response will be given if I click the three button right after I post the comment.
However, if I refresh the page, everything works just fine again.
The same issue happens when I try to edit a comment.
after I submit my revised comment, an empty page will be returned.
my finding
In
journalctl -f -u forem-rails.service
, I find
Can't verify CSRF token authenticity
.
In safari's inspection window, I find there are some errors.
Top comments (4)
Hey @charliebbs, thanks for sharing this issue. Which version of Forem are you currently running? I ask, because I believe this issue that has been fixed.
You can find your version with
thank you for reply
Repository: quay.io/forem/forem:latest SHA256: 6e792b0ec4d12418576ea7993d81aa858479651a2b1eb33a43843260b9d27e00 Created: 23 hours ago
edit: I just run
foremimg quay.io/forem/forem:testing
foremctl update
foremctl depoly
to update the image to the testing branding, but the issue still persists.
@charliebbs You have a typo in
foremctl deploy
in there. Is that how you typed it into the command line? If so, you may still be running the previous version.I'm unable to reproduce this on my own selfhosted Forem instance running on the latest container image. You mention you're using Cloudflare, though, and I'm not, which makes me think this might be a caching issue with the CDN. Specifically, it could be caching pages with outdated CSRF tokens in them. If you point your DNS directly at your Forem instance, does the issue persist?
yes, I think Cloudflare is the issue. I deployed another development instance with docker-compose yesterday. Everything works fine if I connect to it directly with its ip address. However, if I use reverse proxy + Cloudflare to connect to it, the bug appears again. Just want to let everybody who reads here realize Forem is currently NOT compatible with Cloudflare.
Thank you Jamie.