salviof
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] CF7, WP nonce, Cache problemsThis make sence? https://docs.wp-rocket.me/article/1495-contact-form-7-is-not-working
Forum: Plugins
In reply to: [Contact Form 7] CF7, WP nonce, Cache problemsSame in 30 sites
{“code”:”rest_cookie_invalid_nonce”,”message”:”\”Nonce\” de cookie inv\u00e1lido”,”data”:{“status”:403}}
when request a POST /wp-json/contact-form-7/v1/contact-forms/1852/feedback?_locale=userand
fail with a 400 code, returning a simple 0 when request a GET on /wp-admin/admin-ajax.php?action=rest-nonceIf I ignore cache in the page with the form, they pass,in other pages no, my cache configure to 7 days of live Please Help.
Thank you for the great job on CF7 plugin.the wordopress ecosystem are more strong with this solution.
Exist a fast solution when I debugin this in a docker lab? Witch version has no problem?
ThanksForum: Plugins
In reply to: [Contact Form 7] server responded with a status of 403 feedback?_locale=usersame problem, I’m using varnish cache who ignore cache in that situations:
// Do not cache AJAX requests. if (req.http.X-Requested-With == "XMLHttpRequest") { return(pass); } // Post requests will not be cached if (req.http.Authorization || req.method == "POST") { return (pass); } // Only cache GET or HEAD requests. This makes sure the POST requests are always passed. if (req.method != "GET" && req.method != "HEAD") { return (pass); } // Dont Cache WordPress post pages and edit pages if (req.url ~ "(wp-admin|post\.php|edit\.php|wp-login|et_fb=)") { return(pass); } if (req.url ~ "/wp-cron.php" || req.url ~ "preview=true") { return (pass); } // Woocommerce if (req.url ~ "(cart|my-account|checkout|addons)") { return (pass); } if ( req.url ~ "\?add-to-cart=" ) { return (pass); } // Paid memberships Pro PMP if ( req.url ~ "(membership-account|membership-checkout)" ) { return (pass); } // WordPress Social Login Plugin. Note: Need to develop this. Please share if you have an example. if (req.url ~ "(wordpress-social-login|wp-social-login)") { return (pass); }// Remove the "has_js" cookie set req.http.Cookie = regsuball(req.http.Cookie, "has_js=[^;]+(; )?", ""); // Remove any Google Analytics based cookies set req.http.Cookie = regsuball(req.http.Cookie, "__utm.=[^;]+(; )?", ""); set req.http.Cookie = regsuball(req.http.Cookie, "_ga=[^;]+(; )?", ""); set req.http.Cookie = regsuball(req.http.Cookie, "utmctr=[^;]+(; )?", ""); set req.http.Cookie = regsuball(req.http.Cookie, "utmcmd.=[^;]+(; )?", ""); set req.http.Cookie = regsuball(req.http.Cookie, "utmccn.=[^;]+(; )?", ""); // Remove the Quant Capital cookies (added by some plugin, all __qca) set req.http.Cookie = regsuball(req.http.Cookie, "__qc.=[^;]+(; )?", ""); // Remove the wp-settings-1 cookie set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-1=[^;]+(; )?", ""); // Remove the wp-settings-time-1 cookie set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-time-1=[^;]+(; )?", ""); // Remove the wp test cookie set req.http.Cookie = regsuball(req.http.Cookie, "wordpress_test_cookie=[^;]+(; )?", ""); // Remove the phpBB cookie. This will help us cache bots and anonymous users. set req.http.Cookie = regsuball(req.http.Cookie, "style_cookie=[^;]+(; )?", ""); set req.http.Cookie = regsuball(req.http.Cookie, "phpbb3_psyfx_track=[^;]+(; )?", ""); // Remove the cloudflare cookie set req.http.Cookie = regsuball(req.http.Cookie, "__cfduid=[^;]+(; )?", ""); // Remove the PHPSESSID in members area cookie set req.http.Cookie = regsuball(req.http.Cookie, "PHPSESSID=[^;]+(; )?", ""); // Are there cookies left with only spaces or that are empty? if (req.http.cookie ~ "^\s*$") { unset req.http.cookie; } // MEGA DROP. Drop ALL cookies sent to WordPress, except those originating from the URLs defined. // This increases HITs significantly, but be careful it can also break plugins that need cookies. // Note: The /members/ directory had problems with PMP login and social login plugin. // Adding it to the exclude list here (and including it below in the "Retain cookies" list) fixed login. // This works better than than other cookie removal examples found on varnish's website. // Note phpBB directory (forumPM) also passes cookies here. if (!(req.url ~ "(wp-login|wp-admin|cart|my-account|checkout|addons|wordpress-social-login|wp-login\.php|forumPM|members)")) { unset req.http.cookie; }Yes when purge they works once time.
The exactly what issues cause are: They do not load the new sent configuration, then the sync button does not appear.
Ok, my varnish cache all GET request, To work, I had to ignore cache when path containing one of this 3 parts “wp-media-storage-to-cloud” “wp-cloud” “w2cloud”
Thats working fine now..
Thats a example in VCL varnish:
if (req.url ~ "wp-media-storage-to-cloud"){ return (pass); } if (req.url ~ "wp-cloud"){ return (pass); } if (req.url ~ "w2cloud"){ return (pass); }- This reply was modified 5 years, 2 months ago by salviof.
Thanks bro, thats good!