Stripe Conflict
-
Hello,
Stripe needs to be loaded via https but when the protocol rewrite is on it of course strips it from the path.
In other words, https://js.stripe.com/v2/ is obviously outputting /js.stripe.com/v2/.
This is causing errors and customers cannot purchase from the site. I’m looking at the rewrite code in the main file and wondering if there is a quick conditional statement we can add to find the script file (https://js.stripe.com/v2/) and return before the rewrite executes:
if (is_null($content_type) || substr($content_type, 0, 9) === 'text/html') { // replace href or src attributes within script, link, base, and img tags with just "//" for protocol $re = "/(<(script|link|base|img|form)([^>]*)(href|src|action)=[\"'])https?:\\/\\//i"; $subst = "$1//"; $return = preg_replace($re, $subst, $buffer); // on regex error, skip overwriting buffer if ($return) { $buffer = $return; } }
Got any ideas? This is kind of urgent. I cannot turn off the rewrite for the site.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Stripe Conflict’ is closed to new replies.