# Email edits:CSRF token error. Try to refresh the page and try again

**URL:** <https://forum.mautic.org/t/email-edits-csrf-token-error-try-to-refresh-the-page-and-try-again/26961>\
**Category:** Product Support\
**Created:** [February 6, 2023, 2:00am UTC](https://forum.mautic.org/t/email-edits-csrf-token-error-try-to-refresh-the-page-and-try-again/26961 "2023-02-06T02:00:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![globalwarmgsolr](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@globalwarmgsolr](https://forum.mautic.org/u/globalwarmgsolr)\
**Post date:** [February 6, 2023, 2:00am UTC](https://forum.mautic.org/t/email-edits-csrf-token-error-try-to-refresh-the-page-and-try-again/26961/1 "2023-02-06T02:00:37Z")

</div>

Email edits: I simply don’t trust mautic to save more than a few changes between saves.  
After losing (way) too much work,  
I’m now… saving more often than I ever did on a C=64.  
CSRF token error. Try to refresh the page and try again  
The error message steaks by too fast to easily copy/paste it.

It looks like future edits will be (outside) of mautic…  
Suggestions? =)

```auto
Mautic 4.4.5 via cPanel softaculous installer
on Hostgator Snappy 2000
memory to 512mb(of 2gb) & timeout to 300
& LinuxMint 21.1 mate (1 week install)on my laptop
Opera version:95.0.4635.25

My Mautic version is:4.4.5 (“upgrade” toasted my build,while hanging on cache clean, so removed, ReBuilt & NOT “upgrading”)
My PHP version is: 7.4.33
My Database type and version is: MySQL
Server type: MySQL
Server version: 5.7.41 - MySQL Community Server (GPL)
Database client version: libmysql - mysqlnd 7.4.33
```

---

<div class="post-metadata">

**Author:** ![ldev](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@ldev](https://forum.mautic.org/u/ldev)\
**Post date:** [November 30, 2024, 10:59pm UTC](https://forum.mautic.org/t/email-edits-csrf-token-error-try-to-refresh-the-page-and-try-again/26961/2 "2024-11-30T22:59:35Z")

</div>

if any of you are running into a weird inconsistent CSRF problems with mautic after fresh installation.

where sometimes mautic works, but in like 50% of cases it reports “The CSRF token is invalid. Please try to resubmit the form.” and doesn’t save…

It turned out that - In my docker setup - I intentionally have ipv6 enabled.  
Also my docker networks have ipv6 configured.  
So my mautic containers get both IPv6 and IPv4 - Docker will then use either one.

So you have to make sure to whitelist IPv6 range in trusted\_proxies as well (not only ipv4).

```auto
        'trusted_proxies' => array(
                '0' => '0.0.0.0/0',
                '1' => '::/0'
        ),

```
