• Resolved j3pydev

    (@j3pydev)


    I have a contact form using Contact Form 7 and it has worked for a long time until I recently moved to AWS. My new setup has WordPress running on an EC2 instance behind a Elastic Load Balancer (ELB). The ELB is where SSL is set so basically what’s happening is that the site is on https (eg, https://example.com/contact), but the url the form attempts to POST to is http (eg, https://example.com/wp-json/contact-form-7/v1/contact-forms/feedback, because the EC2 instance behind the ELB is not SSL). And that causes the POST request to fail. However, when I look at the form page and the plugin files I don’t see where I can force SSL for this URL. For example, in Laravel one might use the url method, url(‘/contact’), and that can be changed to secure_url(‘/contact’). Any ideas?

    • This topic was modified 6 years ago by j3pydev.
Viewing 1 replies (of 1 total)
  • Thread Starter j3pydev

    (@j3pydev)

    Fixed it by changing define('WP_HOME', 'example.com'); to define('WP_HOME', 'https://example.com'); . This prevents me from directly accessing the EC2 instance behind the ELB, but that’s ok for my purposes.

Viewing 1 replies (of 1 total)
  • The topic ‘Mixed-content blocks form submission on AWS with load balancer’ is closed to new replies.