valet share, ngrok giving 404, CORS errors I have a Craft instance running via Valet, per the instructions here.

Running the project via valet link works great, and valet share works, except when I try to access the admin side. I'm using valet share to try to access the site over a local network for a demo.

In Chrome from http://ad3f5068.ngrok.io/admin/login when I try to log in, I get:

OPTIONS http://craftycoffee.test:60/index.php?p=admin/actions/users/login 404 (Not Found)
Access to XMLHttpRequest at 'http://craftycoffee.test:60/index.php?p=admin/actions/users/login' from origin 'http://ad3f5068.ngrok.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.


If I use HTTPS, I get net::ERR_SSL_PROTOCOL_ERROR across a bunch of requests.

What am I missing to get this to share over a local host?
I'm not 100% sure this is the answer to your issue; but this might be the solution:

Helge has written an article here about using ngrok with Craft CMS (which I'd recommend looking over if you haven't already). In particular, he mentions he has the following lines in his Craft config particularly for logging into the CP over ngrok:

// Logging in to the CP will fail unless you turn off CSRF protection.
'enableCsrfProtection' =&gt; false,


Try that config option and see if that fixes the issue for you...