valet: Site that has been 'valet unsecure'd still serves HTTP URLs with 301 to HTTPS

I’m using valet with a WordPress install, where I’m trying to test some things related to the WordPress AMP plugin. The AMP plugin contains functionality that uses PHP’s curl to fetch the site’s own pages, in order to validate the page’s markup for AMP compliance.

When the site had been valet secured, the AMP validation plugin complained that it was unable to connect to the server, because of a certificate validation failure.

I ran valet unsecure to try to get valet to stop serving the site over HTTPS, and wp search-replace "https://trust.test" "http://trust.test" to make sure that the WordPress site was representing itself in links as an HTTP site rather than an HTTPS site. Even after valet restart and clearing browser caches, valet continues to serve HTTP URLs with a 301 redirect to the HTTPS location.

My questions are as follows:

  • Is there a way to insert a certificate from valet secure into PHP curl’s cert store so that PHP’s curl functionality trusts the self-signed certificates issued by valet secure?
  • Is there a way to get valet to stop serving 301s?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

No worries.

Let’s close this issue then.