I’m guessing this is important judging by all the exclamation points. I keep seeing this in the error log when i visit visceralsound.ca
“…[ERROR]… [Module:Cache] vary request header “Origin” not defined!!!”
It’s a wordpress site running the LS Cache plugin. I’m getting the impression that it’s slow to load on first visit, as if it wasn’t using a cached version at all.
The problem appears to be with the Contact page. It’s either the Contact Form 7 hooks that load its JS and CSS, or less likely, something with ReCaptcha. Still investigating…
I was wrong! It seems that the error actually comes from some sort of cache-busting(?) method that Contact Form 7 tries to call through JS.
Inside CF7s scripts.js, you’ll see
if ( wpcf7.cached ) {
wpcf7.refill( $form );
}
This refill method is what results in a 500 error on the page when it’s called. The method itself seems to use the Ajax setRequestHeader() method via jQuery. Inside of the response headers I can see “Vary: Origin”, and that might explain the OLS error message in the initial post.
So thanks to a bit of searching, my ‘solution’ is to modify the scripts.js file and changed the .cached property:
if ( wpcf7.cached ) {
wpcf7.cached = 0;
}
The form works fine and I no longer get the 500 error or the error message in my log.